Skip to content

Commit 8b90470

Browse files
committed
chore: test testcases with @unittest.skip decorator
Signed-off-by: Lee Dogeon <dev.moreal@gmail.com>
1 parent b59a666 commit 8b90470

File tree

6 files changed

+12
-11
lines changed

6 files changed

+12
-11
lines changed

Lib/test/test_ast.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -340,7 +340,8 @@ class X:
340340
support.gc_collect()
341341
self.assertIsNone(ref())
342342

343-
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'not implemented: async for comprehensions'")
343+
# TODO: RUSTPYTHON
344+
@unittest.expectedFailure
344345
def test_snippets(self):
345346
for input, output, kind in ((exec_tests, exec_results, "exec"),
346347
(single_tests, single_results, "single"),
@@ -353,15 +354,17 @@ def test_snippets(self):
353354
with self.subTest(action="compiling", input=i, kind=kind):
354355
compile(ast_tree, "?", kind)
355356

356-
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'not implemented: async for comprehensions'")
357+
# TODO: RUSTPYTHON
358+
@unittest.expectedFailure
357359
def test_ast_validation(self):
358360
# compile() is the only function that calls PyAST_Validate
359361
snippets_to_validate = exec_tests + single_tests + eval_tests
360362
for snippet in snippets_to_validate:
361363
tree = ast.parse(snippet)
362364
compile(tree, '<string>', 'exec')
363365

364-
@unittest.skip("TODO: RUSTPYTHON, OverflowError: Python int too large to convert to Rust u32")
366+
# TODO: RUSTPYTHON
367+
@unittest.expectedFailure
365368
def test_invalid_position_information(self):
366369
invalid_linenos = [
367370
(10, 1), (-10, -11), (10, -11), (-5, -2), (-5, 1)

Lib/test/test_cmd_line.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -259,7 +259,8 @@ def test_undecodable_code(self):
259259
if not stdout.startswith(pattern):
260260
raise AssertionError("%a doesn't start with %a" % (stdout, pattern))
261261

262-
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'unexpected invalid UTF-8 code point'")
262+
# TODO: RUSTPYTHON
263+
@unittest.expectedFailure
263264
@unittest.skipIf(sys.platform == 'win32',
264265
'Windows has a native unicode API')
265266
def test_invalid_utf8_arg(self):

Lib/test/test_float.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,8 +153,6 @@ def check(s):
153153
# non-UTF-8 byte string
154154
check(b'123\xa0')
155155

156-
# TODO: RUSTPYTHON
157-
@unittest.skip("RustPython panics on this")
158156
@support.run_with_locale('LC_NUMERIC', 'fr_FR', 'de_DE', '')
159157
def test_float_with_comma(self):
160158
# set locale to something that doesn't use '.' for the decimal point

Lib/test/test_io.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5098,13 +5098,15 @@ def alarm2(sig, frame):
50985098
if e.errno != errno.EBADF:
50995099
raise
51005100

5101-
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'already borrowed: BorrowMutError'")
5101+
# TODO: RUSTPYTHON
5102+
@unittest.expectedFailure
51025103
@requires_alarm
51035104
@support.requires_resource('walltime')
51045105
def test_interrupted_write_retry_buffered(self):
51055106
self.check_interrupted_write_retry(b"x", mode="wb")
51065107

5107-
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'already borrowed: BorrowMutError'")
5108+
# TODO: RUSTPYTHON
5109+
@unittest.expectedFailure
51085110
@requires_alarm
51095111
@support.requires_resource('walltime')
51105112
def test_interrupted_write_retry_text(self):

Lib/test/test_strftime.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,6 @@ def setUp(self):
6363
setlocale(LC_TIME, 'C')
6464
self.addCleanup(setlocale, LC_TIME, saved_locale)
6565

66-
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'a Display implementation returned an error unexpectedly: Error'")
6766
def test_strftime(self):
6867
now = time.time()
6968
self._update_variables(now)

Lib/test/test_time.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,6 @@ def _bounds_checking(self, func):
236236
def test_strftime_bounding_check(self):
237237
self._bounds_checking(lambda tup: time.strftime('', tup))
238238

239-
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'a Display implementation returned an error unexpectedly: Error'")
240239
def test_strftime_format_check(self):
241240
# Test that strftime does not crash on invalid format strings
242241
# that may trigger a buffer overread. When not triggered,
@@ -459,7 +458,6 @@ def test_mktime(self):
459458

460459
# Issue #13309: passing extreme values to mktime() or localtime()
461460
# borks the glibc's internal timezone data.
462-
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'a Display implementation returned an error unexpectedly: Error'")
463461
@unittest.skipUnless(platform.libc_ver()[0] != 'glibc',
464462
"disabled because of a bug in glibc. Issue #13309")
465463
def test_mktime_error(self):

0 commit comments

Comments
 (0)