chore: test testcases with @unittest.skip decorator (#5871)

Signed-off-by: Lee Dogeon <dev.moreal@gmail.com>
This commit is contained in:
Lee Dogeon
2025-06-30 19:07:58 +09:00
committed by GitHub
parent b59a6666fe
commit 5953a938bd
6 changed files with 12 additions and 11 deletions

View File

@@ -340,7 +340,8 @@ class AST_Tests(unittest.TestCase):
support.gc_collect()
self.assertIsNone(ref())
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'not implemented: async for comprehensions'")
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_snippets(self):
for input, output, kind in ((exec_tests, exec_results, "exec"),
(single_tests, single_results, "single"),
@@ -353,7 +354,8 @@ class AST_Tests(unittest.TestCase):
with self.subTest(action="compiling", input=i, kind=kind):
compile(ast_tree, "?", kind)
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'not implemented: async for comprehensions'")
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_ast_validation(self):
# compile() is the only function that calls PyAST_Validate
snippets_to_validate = exec_tests + single_tests + eval_tests
@@ -361,7 +363,8 @@ class AST_Tests(unittest.TestCase):
tree = ast.parse(snippet)
compile(tree, '<string>', 'exec')
@unittest.skip("TODO: RUSTPYTHON, OverflowError: Python int too large to convert to Rust u32")
# TODO: RUSTPYTHON
@unittest.expectedFailure
def test_invalid_position_information(self):
invalid_linenos = [
(10, 1), (-10, -11), (10, -11), (-5, -2), (-5, 1)

View File

@@ -259,7 +259,8 @@ class CmdLineTest(unittest.TestCase):
if not stdout.startswith(pattern):
raise AssertionError("%a doesn't start with %a" % (stdout, pattern))
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'unexpected invalid UTF-8 code point'")
# TODO: RUSTPYTHON
@unittest.expectedFailure
@unittest.skipIf(sys.platform == 'win32',
'Windows has a native unicode API')
def test_invalid_utf8_arg(self):

View File

@@ -153,8 +153,6 @@ class GeneralFloatCases(unittest.TestCase):
# non-UTF-8 byte string
check(b'123\xa0')
# TODO: RUSTPYTHON
@unittest.skip("RustPython panics on this")
@support.run_with_locale('LC_NUMERIC', 'fr_FR', 'de_DE', '')
def test_float_with_comma(self):
# set locale to something that doesn't use '.' for the decimal point

6
Lib/test/test_io.py vendored
View File

@@ -5098,13 +5098,15 @@ class SignalsTest(unittest.TestCase):
if e.errno != errno.EBADF:
raise
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'already borrowed: BorrowMutError'")
# TODO: RUSTPYTHON
@unittest.expectedFailure
@requires_alarm
@support.requires_resource('walltime')
def test_interrupted_write_retry_buffered(self):
self.check_interrupted_write_retry(b"x", mode="wb")
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'already borrowed: BorrowMutError'")
# TODO: RUSTPYTHON
@unittest.expectedFailure
@requires_alarm
@support.requires_resource('walltime')
def test_interrupted_write_retry_text(self):

View File

@@ -63,7 +63,6 @@ class StrftimeTest(unittest.TestCase):
setlocale(LC_TIME, 'C')
self.addCleanup(setlocale, LC_TIME, saved_locale)
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'a Display implementation returned an error unexpectedly: Error'")
def test_strftime(self):
now = time.time()
self._update_variables(now)

View File

@@ -236,7 +236,6 @@ class TimeTestCase(unittest.TestCase):
def test_strftime_bounding_check(self):
self._bounds_checking(lambda tup: time.strftime('', tup))
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'a Display implementation returned an error unexpectedly: Error'")
def test_strftime_format_check(self):
# Test that strftime does not crash on invalid format strings
# that may trigger a buffer overread. When not triggered,
@@ -459,7 +458,6 @@ class TimeTestCase(unittest.TestCase):
# Issue #13309: passing extreme values to mktime() or localtime()
# borks the glibc's internal timezone data.
@unittest.skip("TODO: RUSTPYTHON, thread 'main' panicked at 'a Display implementation returned an error unexpectedly: Error'")
@unittest.skipUnless(platform.libc_ver()[0] != 'glibc',
"disabled because of a bug in glibc. Issue #13309")
def test_mktime_error(self):