diff --git a/Lib/test/test_ast/test_ast.py b/Lib/test/test_ast/test_ast.py index 3ff1cea2bf..57c19477ab 100644 --- a/Lib/test/test_ast/test_ast.py +++ b/Lib/test/test_ast/test_ast.py @@ -2396,7 +2396,7 @@ def test_stdlib_validates(self): ast.MatchMapping([], [], rest="_"), ] - @unittest.skip("TODO: RUSTPYTHON; thread 'main' panicked") + @unittest.expectedFailure # TODO: RUSTPYTHON def test_match_validation_pattern(self): name_x = ast.Name("x", ast.Load()) for pattern in self._MATCH_PATTERNS: diff --git a/Lib/test/test_bdb.py b/Lib/test/test_bdb.py index d1c1c78686..c41fb763a1 100644 --- a/Lib/test/test_bdb.py +++ b/Lib/test/test_bdb.py @@ -590,7 +590,7 @@ def fail(self, msg=None): class StateTestCase(BaseTestCase): """Test the step, next, return, until and quit 'set_' methods.""" - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_step(self): self.expect_set = [ ('line', 2, 'tfunc_main'), ('step', ), @@ -601,7 +601,7 @@ def test_step(self): with TracerRun(self) as tracer: tracer.runcall(tfunc_main) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_step_next_on_last_statement(self): for set_type in ('step', 'next'): with self.subTest(set_type=set_type): @@ -616,8 +616,7 @@ def test_step_next_on_last_statement(self): with TracerRun(self) as tracer: tracer.runcall(tfunc_main) - @unittest.skip('TODO: RUSTPYTHON') - # AssertionError: All paired tuples have not been processed, the last one was number 1 [('next',), ('quit',)] + @unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: All paired tuples have not been processed, the last one was number 1 [('next',), ('quit',)] def test_stepinstr(self): self.expect_set = [ ('line', 2, 'tfunc_main'), ('stepinstr', ), @@ -627,7 +626,7 @@ def test_stepinstr(self): with TracerRun(self) as tracer: tracer.runcall(tfunc_main) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_next(self): self.expect_set = [ ('line', 2, 'tfunc_main'), ('step', ), @@ -639,7 +638,7 @@ def test_next(self): with TracerRun(self) as tracer: tracer.runcall(tfunc_main) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_next_over_import(self): code = """ def main(): @@ -654,7 +653,7 @@ def main(): with TracerRun(self) as tracer: tracer.runcall(tfunc_import) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_next_on_plain_statement(self): # Check that set_next() is equivalent to set_step() on a plain # statement. @@ -667,7 +666,7 @@ def test_next_on_plain_statement(self): with TracerRun(self) as tracer: tracer.runcall(tfunc_main) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_next_in_caller_frame(self): # Check that set_next() in the caller frame causes the tracer # to stop next in the caller frame. @@ -681,7 +680,7 @@ def test_next_in_caller_frame(self): with TracerRun(self) as tracer: tracer.runcall(tfunc_main) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_return(self): self.expect_set = [ ('line', 2, 'tfunc_main'), ('step', ), @@ -694,7 +693,7 @@ def test_return(self): with TracerRun(self) as tracer: tracer.runcall(tfunc_main) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_return_in_caller_frame(self): self.expect_set = [ ('line', 2, 'tfunc_main'), ('step', ), @@ -706,7 +705,7 @@ def test_return_in_caller_frame(self): with TracerRun(self) as tracer: tracer.runcall(tfunc_main) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_until(self): self.expect_set = [ ('line', 2, 'tfunc_main'), ('step', ), @@ -718,7 +717,7 @@ def test_until(self): with TracerRun(self) as tracer: tracer.runcall(tfunc_main) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_until_with_too_large_count(self): self.expect_set = [ ('line', 2, 'tfunc_main'), break_in_func('tfunc_first'), @@ -729,7 +728,7 @@ def test_until_with_too_large_count(self): with TracerRun(self) as tracer: tracer.runcall(tfunc_main) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_until_in_caller_frame(self): self.expect_set = [ ('line', 2, 'tfunc_main'), ('step', ), @@ -741,7 +740,7 @@ def test_until_in_caller_frame(self): with TracerRun(self) as tracer: tracer.runcall(tfunc_main) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs @patch_list(sys.meta_path) def test_skip(self): # Check that tracing is skipped over the import statement in @@ -775,7 +774,7 @@ def test_skip_with_no_name_module(self): bdb = Bdb(skip=['anything*']) self.assertIs(bdb.is_skipped_module(None), False) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_down(self): # Check that set_down() raises BdbError at the newest frame. self.expect_set = [ @@ -784,7 +783,7 @@ def test_down(self): with TracerRun(self) as tracer: self.assertRaises(BdbError, tracer.runcall, tfunc_main) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_up(self): self.expect_set = [ ('line', 2, 'tfunc_main'), ('step', ), @@ -798,7 +797,7 @@ def test_up(self): class BreakpointTestCase(BaseTestCase): """Test the breakpoint set method.""" - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_bp_on_non_existent_module(self): self.expect_set = [ ('line', 2, 'tfunc_import'), ('break', ('/non/existent/module.py', 1)) @@ -806,7 +805,7 @@ def test_bp_on_non_existent_module(self): with TracerRun(self) as tracer: self.assertRaises(BdbError, tracer.runcall, tfunc_import) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_bp_after_last_statement(self): code = """ def main(): @@ -820,7 +819,7 @@ def main(): with TracerRun(self) as tracer: self.assertRaises(BdbError, tracer.runcall, tfunc_import) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_temporary_bp(self): code = """ def func(): @@ -844,7 +843,7 @@ def main(): with TracerRun(self) as tracer: tracer.runcall(tfunc_import) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_disabled_temporary_bp(self): code = """ def func(): @@ -873,7 +872,7 @@ def main(): with TracerRun(self) as tracer: tracer.runcall(tfunc_import) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_bp_condition(self): code = """ def func(a): @@ -894,7 +893,7 @@ def main(): with TracerRun(self) as tracer: tracer.runcall(tfunc_import) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_bp_exception_on_condition_evaluation(self): code = """ def func(a): @@ -914,7 +913,7 @@ def main(): with TracerRun(self) as tracer: tracer.runcall(tfunc_import) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_bp_ignore_count(self): code = """ def func(): @@ -936,7 +935,7 @@ def main(): with TracerRun(self) as tracer: tracer.runcall(tfunc_import) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_ignore_count_on_disabled_bp(self): code = """ def func(): @@ -964,7 +963,7 @@ def main(): with TracerRun(self) as tracer: tracer.runcall(tfunc_import) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_clear_two_bp_on_same_line(self): code = """ def func(): @@ -990,7 +989,7 @@ def main(): with TracerRun(self) as tracer: tracer.runcall(tfunc_import) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_clear_at_no_bp(self): self.expect_set = [ ('line', 2, 'tfunc_import'), ('clear', (__file__, 1)) @@ -1044,7 +1043,7 @@ def test_load_bps_from_previous_Bdb_instance(self): class RunTestCase(BaseTestCase): """Test run, runeval and set_trace.""" - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_run_step(self): # Check that the bdb 'run' method stops at the first line event. code = """ @@ -1057,7 +1056,7 @@ def test_run_step(self): with TracerRun(self) as tracer: tracer.run(compile(textwrap.dedent(code), '', 'exec')) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_runeval_step(self): # Test bdb 'runeval'. code = """ @@ -1080,7 +1079,7 @@ def main(): class IssuesTestCase(BaseTestCase): """Test fixed bdb issues.""" - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_step_at_return_with_no_trace_in_caller(self): # Issue #13183. # Check that the tracer does step into the caller frame when the @@ -1111,7 +1110,7 @@ def func(): with TracerRun(self) as tracer: tracer.runcall(tfunc_import) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_next_until_return_in_generator(self): # Issue #16596. # Check that set_next(), set_until() and set_return() do not treat the @@ -1153,7 +1152,7 @@ def main(): with TracerRun(self) as tracer: tracer.runcall(tfunc_import) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_next_command_in_generator_for_loop(self): # Issue #16596. code = """ @@ -1185,7 +1184,7 @@ def main(): with TracerRun(self) as tracer: tracer.runcall(tfunc_import) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_next_command_in_generator_with_subiterator(self): # Issue #16596. code = """ @@ -1217,7 +1216,7 @@ def main(): with TracerRun(self) as tracer: tracer.runcall(tfunc_import) - @unittest.skip('TODO: RUSTPYTHON; Error in atexit._run_exitfuncs') + @unittest.expectedFailure # TODO: RUSTPYTHON; Error in atexit._run_exitfuncs def test_return_command_in_generator_with_subiterator(self): # Issue #16596. code = """ @@ -1249,8 +1248,7 @@ def main(): with TracerRun(self) as tracer: tracer.runcall(tfunc_import) - @unittest.skip('TODO: RUSTPYTHON') - # AssertionError: All paired tuples have not been processed, the last one was number 1 [('next',)] + @unittest.expectedFailure # TODO: RUSTPYTHON; AssertionError: All paired tuples have not been processed, the last one was number 1 [('next',)] def test_next_to_botframe(self): # gh-125422 # Check that next command won't go to the bottom frame. diff --git a/Lib/test/test_bytes.py b/Lib/test/test_bytes.py index 8f01f89030..a1a711da70 100644 --- a/Lib/test/test_bytes.py +++ b/Lib/test/test_bytes.py @@ -2138,7 +2138,6 @@ def test_join(self): s3 = s1.join([b"abcd"]) self.assertIs(type(s3), self.basetype) - @unittest.skip('TODO: RUSTPYTHON; Fails on ByteArraySubclassWithSlotsTest') def test_pickle(self): a = self.type2test(b"abcd") a.x = 10 @@ -2153,7 +2152,6 @@ def test_pickle(self): self.assertEqual(type(a.z), type(b.z)) self.assertFalse(hasattr(b, 'y')) - @unittest.skip('TODO: RUSTPYTHON; Fails on ByteArraySubclassWithSlotsTest') def test_copy(self): a = self.type2test(b"abcd") a.x = 10 diff --git a/Lib/test/test_class.py b/Lib/test/test_class.py index 29215f0600..a70a807897 100644 --- a/Lib/test/test_class.py +++ b/Lib/test/test_class.py @@ -611,7 +611,6 @@ def assertNotOrderable(self, a, b): with self.assertRaises(TypeError): a >= b - @unittest.skip("TODO: RUSTPYTHON; unstable result") def testHashComparisonOfMethods(self): # Test comparison and hash of methods class A: diff --git a/Lib/test/test_compile.py b/Lib/test/test_compile.py index 9f6ad6879c..bbaf3c5c19 100644 --- a/Lib/test/test_compile.py +++ b/Lib/test/test_compile.py @@ -108,7 +108,6 @@ def __getitem__(self, key): exec('z = a', g, d) self.assertEqual(d['z'], 12) - @unittest.skip("TODO: RUSTPYTHON; segmentation fault") def test_extended_arg(self): # default: 1000 * 2.5 = 2500 repetitions repeat = int(sys.getrecursionlimit() * 2.5) diff --git a/Lib/test/test_configparser.py b/Lib/test/test_configparser.py index d793cc5890..d95b504f82 100644 --- a/Lib/test/test_configparser.py +++ b/Lib/test/test_configparser.py @@ -762,7 +762,7 @@ def test_read_returns_file_list(self): parsed_files = cf.read([], encoding="utf-8") self.assertEqual(parsed_files, []) - @unittest.skip("TODO: RUSTPYTHON, suspected to make CI hang") + # XXX: RUSTPYTHON; This test might cause CI hang def test_read_returns_file_list_with_bytestring_path(self): if self.delimiters[0] != '=': self.skipTest('incompatible format') diff --git a/Lib/test/test_context.py b/Lib/test/test_context.py index 06270e161d..aa83c6bbd7 100644 --- a/Lib/test/test_context.py +++ b/Lib/test/test_context.py @@ -358,7 +358,6 @@ def ctx2_fun(): ctx1.run(ctx1_fun) - @unittest.skip("TODO: RUSTPYTHON; threading is not safe") @isolated_context @threading_helper.requires_working_threading() def test_context_threads_1(self): diff --git a/Lib/test/test_descr.py b/Lib/test/test_descr.py index b3d973237d..7420a49b8f 100644 --- a/Lib/test/test_descr.py +++ b/Lib/test/test_descr.py @@ -1834,8 +1834,8 @@ def __init__(self, foo): object.__init__(A(3)) self.assertRaises(TypeError, object.__init__, A(3), 5) - @unittest.skip('TODO: RUSTPYTHON; This passes, but the `expectedFailure` here is from CPython, so this test is an "UNEXPECTED SUCCESS" (not good)') - @unittest.expectedFailure + # TODO: RUSTPYTHON; The `expectedFailure` here is from CPython, so this test must fail + # @unittest.expectedFailure def test_restored_object_new(self): class A(object): def __new__(cls, *args, **kwargs): diff --git a/Lib/test/test_docxmlrpc.py b/Lib/test/test_docxmlrpc.py index 3c05412ef5..999533a72a 100644 --- a/Lib/test/test_docxmlrpc.py +++ b/Lib/test/test_docxmlrpc.py @@ -119,7 +119,7 @@ def test_invalid_get_response(self): response.read() - @unittest.skip('TODO: RUSTPYTHON; http.client.RemoteDisconnected: Remote end closed connection without response') + @unittest.expectedFailure # TODO: RUSTPYTHON; http.client.RemoteDisconnected: Remote end closed connection without response def test_lambda(self): """Test that lambda functionality stays the same. The output produced currently is, I suspect invalid because of the unencoded brackets in the @@ -160,9 +160,9 @@ def test_autolinking(self): b'auto-linked, too:
\n' b'http://google.com.'), response) + @unittest.expectedFailure # TODO: RUSTPYTHON; http.client.RemoteDisconnected: Remote end closed connection without response @make_request_and_skipIf(sys.flags.optimize >= 2, "Docstrings are omitted with -O2 and above") - @unittest.skip('TODO: RUSTPYTHON; http.client.RemoteDisconnected: Remote end closed connection without response') def test_system_methods(self): """Test the presence of three consecutive system.* methods. @@ -190,7 +190,7 @@ def test_system_methods(self): b'
\nThis server does NOT support system' b'.methodSignature.'), response) - @unittest.skip('TODO: RUSTPYTHON; http.client.RemoteDisconnected: Remote end closed connection without response') + @unittest.expectedFailure # TODO: RUSTPYTHON; http.client.RemoteDisconnected: Remote end closed connection without response def test_autolink_dotted_methods(self): """Test that selfdot values are made strong automatically in the documentation.""" @@ -200,7 +200,7 @@ def test_autolink_dotted_methods(self): self.assertIn(b"""Try self.add, too.""", response.read()) - @unittest.skip('TODO: RUSTPYTHON; http.client.RemoteDisconnected: Remote end closed connection without response') + @unittest.expectedFailure # TODO: RUSTPYTHON; http.client.RemoteDisconnected: Remote end closed connection without response def test_annotations(self): """ Test that annotations works as expected """ self.client.request("GET", "/") @@ -214,7 +214,7 @@ def test_annotations(self): b'method_annotation(x: bytes)'), response.read()) - @unittest.skip('TODO: RUSTPYTHON; TypeError: HTMLDoc.heading() missing 2 required positional arguments: "fgcol" and "bgcol"') + @unittest.expectedFailure # TODO: RUSTPYTHON; TypeError: HTMLDoc.heading() missing 2 required positional arguments: "fgcol" and "bgcol" def test_server_title_escape(self): # bpo-38243: Ensure that the server title and documentation # are escaped for HTML. diff --git a/Lib/test/test_enum.py b/Lib/test/test_enum.py index b9d9cf33e3..5a961711cc 100644 --- a/Lib/test/test_enum.py +++ b/Lib/test/test_enum.py @@ -445,7 +445,7 @@ def spam(cls): with self.assertRaises(AttributeError): del Season.SPRING.name - @unittest.skip('TODO: RUSTPYTHON') + @unittest.expectedFailure # TODO: RUSTPYTHON # RuntimeError: Error calling __set_name__ on '_proto_member' instance failed in 'BadSuper' def test_bad_new_super(self): with self.assertRaisesRegex( @@ -1923,7 +1923,7 @@ def test_wrong_inheritance_order(self): class Wrong(Enum, str): NotHere = 'error before this point' - @unittest.skip('TODO: RUSTPYTHON') + @unittest.expectedFailure # TODO: RUSTPYTHON # RuntimeError: Error calling __set_name__ on '_proto_member' instance INVALID in 'RgbColor' def test_raise_custom_error_on_creation(self): class InvalidRgbColorError(ValueError): @@ -2613,7 +2613,7 @@ class Test(Base2): self.assertEqual(Test.flash.flash, 'flashy dynamic') self.assertEqual(Test.flash.value, 1) - @unittest.skip('TODO: RUSTPYTHON') + @unittest.expectedFailure # TODO: RUSTPYTHON # RuntimeError: Error calling __set_name__ on '_proto_member' instance grene in 'Color' def test_no_duplicates(self): class UniqueEnum(Enum): @@ -3000,7 +3000,7 @@ def test_empty_globals(self): local_ls = {} exec(code, global_ns, local_ls) - @unittest.skip('TODO: RUSTPYTHON') + @unittest.expectedFailure # TODO: RUSTPYTHON # RuntimeError: Error calling __set_name__ on '_proto_member' instance one in 'FirstFailedStrEnum' def test_strenum(self): class GoodStrEnum(StrEnum): @@ -3126,7 +3126,7 @@ class ThirdFailedStrEnum(CustomStrEnum): one = '1' two = b'2', 'ascii', 9 - @unittest.skip('TODO: RUSTPYTHON') + @unittest.expectedFailure # TODO: RUSTPYTHON # RuntimeError: Error calling __set_name__ on '_proto_member' instance key_type in 'Combined' def test_missing_value_error(self): with self.assertRaisesRegex(TypeError, "_value_ not set in __new__"): @@ -3414,7 +3414,7 @@ def __new__(cls, c): self.assertEqual(FlagFromChar.a, 158456325028528675187087900672) self.assertEqual(FlagFromChar.a|1, 158456325028528675187087900673) - @unittest.skip('TODO: RUSTPYTHON') + @unittest.expectedFailure # TODO: RUSTPYTHON # RuntimeError: Error calling __set_name__ on '_proto_member' instance A in 'MyEnum' def test_init_exception(self): class Base: diff --git a/Lib/test/test_future_stmt/test_future.py b/Lib/test/test_future_stmt/test_future.py index a7d649b32a..febd9fb095 100644 --- a/Lib/test/test_future_stmt/test_future.py +++ b/Lib/test/test_future_stmt/test_future.py @@ -195,7 +195,7 @@ def test_syntactical_future_repl(self): out = kill_python(p) self.assertNotIn(b'SyntaxError: invalid syntax', out) - @unittest.skip('TODO: RUSTPYTHON') + @unittest.expectedFailure # TODO: RUSTPYTHON # SyntaxError: future feature spam is not defined def test_future_dotted_import(self): with self.assertRaises(ImportError): diff --git a/Lib/test/test_http_cookiejar.py b/Lib/test/test_http_cookiejar.py index f4b9dc6a28..68a693c78b 100644 --- a/Lib/test/test_http_cookiejar.py +++ b/Lib/test/test_http_cookiejar.py @@ -125,7 +125,6 @@ def test_http2time_garbage(self): "http2time(%s) is not None\n" "http2time(test) %s" % (test, http2time(test))) - @unittest.skip("TODO: RUSTPYTHON, regressed to cubic complexity") def test_http2time_redos_regression_actually_completes(self): # LOOSE_HTTP_DATE_RE was vulnerable to malicious input which caused catastrophic backtracking (REDoS). # If we regress to cubic complexity, this test will take a very long time to succeed. diff --git a/Lib/test/test_importlib/test_threaded_import.py b/Lib/test/test_importlib/test_threaded_import.py index 3ceb86cbea..f624e7d2c8 100644 --- a/Lib/test/test_importlib/test_threaded_import.py +++ b/Lib/test/test_importlib/test_threaded_import.py @@ -249,14 +249,14 @@ def target(): __import__(TESTFN) del sys.modules[TESTFN] - @unittest.skip("TODO: RUSTPYTHON; hang") + @unittest.skip('TODO: RUSTPYTHON; hang; Suspected cause of crashes in Windows CI - PermissionError: [WinError 32] Permission denied: "C:\\Users\\RUNNER~1\\AppData\\Local\\Temp\\test_python_0cdrhhs_\\test_python_6340æ"') def test_concurrent_futures_circular_import(self): # Regression test for bpo-43515 fn = os.path.join(os.path.dirname(__file__), 'partial', 'cfimport.py') script_helper.assert_python_ok(fn) - @unittest.skip("TODO: RUSTPYTHON - fails on Linux due to multiprocessing issues") + @unittest.skip('TODO: RUSTPYTHON; hang') def test_multiprocessing_pool_circular_import(self): # Regression test for bpo-41567 fn = os.path.join(os.path.dirname(__file__), diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py index 3c507c3049..741920a586 100644 --- a/Lib/test/test_io.py +++ b/Lib/test/test_io.py @@ -1843,13 +1843,6 @@ def test_bad_readinto_type(self): def test_error_through_destructor(self): return super().test_error_through_destructor() - def test_truncate_on_read_only(self): - return super().test_truncate_on_read_only() - - @unittest.skip('TODO: RUSTPYTHON; fallible allocation') - def test_constructor(self): - return super().test_constructor() - @unittest.expectedFailure # TODO: RUSTPYTHON def test_pickling_subclass(self): return super().test_pickling_subclass() @@ -2196,10 +2189,6 @@ def test_args_error(self): def test_error_through_destructor(self): return super().test_error_through_destructor() - @unittest.skip('TODO: RUSTPYTHON; fallible allocation') - def test_constructor(self): - return super().test_constructor() - @unittest.expectedFailure # TODO: RUSTPYTHON def test_pickling_subclass(self): return super().test_pickling_subclass() @@ -2695,10 +2684,6 @@ def test_args_error(self): def test_error_through_destructor(self): return super().test_error_through_destructor() - @unittest.skip('TODO: RUSTPYTHON; fallible allocation') - def test_constructor(self): - return super().test_constructor() - @unittest.expectedFailure # TODO: RUSTPYTHON def test_pickling_subclass(self): return super().test_pickling_subclass() @@ -4222,16 +4207,10 @@ def write(self, data): self.assertEqual([b"abcdef", b"middle", b"g"*chunk_size], buf._write_stack) - def test_basic_io(self): - return super().test_basic_io() - @unittest.expectedFailure # TODO: RUSTPYTHON def test_constructor(self): return super().test_constructor() - def test_detach(self): - return super().test_detach() - @unittest.expectedFailure # TODO: RUSTPYTHON def test_newlines(self): return super().test_newlines() @@ -4288,9 +4267,6 @@ def test_error_through_destructor(self): def test_repr(self): return super().test_repr() - def test_uninitialized(self): - return super().test_uninitialized() - @unittest.expectedFailure # TODO: RUSTPYTHON def test_recursive_repr(self): return super().test_recursive_repr() diff --git a/Lib/test/test_itertools.py b/Lib/test/test_itertools.py index 03dadb71f7..1c0c38ee04 100644 --- a/Lib/test/test_itertools.py +++ b/Lib/test/test_itertools.py @@ -1807,7 +1807,6 @@ def __next__(self): with self.assertRaisesRegex(RuntimeError, "tee"): next(a) - @unittest.skip("TODO: RUSTPYTHON; , hangs") @threading_helper.requires_working_threading() def test_tee_concurrent(self): start = threading.Event() diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py index 752054b729..8ea77d186e 100644 --- a/Lib/test/test_logging.py +++ b/Lib/test/test_logging.py @@ -1115,7 +1115,6 @@ class SMTPHandlerTest(BaseTest): # bpo-14314, bpo-19665, bpo-34092: don't wait forever TIMEOUT = support.LONG_TIMEOUT - @unittest.skip("TODO: RUSTPYTHON; hangs") def test_basic(self): sockmap = {} server = TestSMTPServer((socket_helper.HOST, 0), self.process_message, 0.001, @@ -2153,7 +2152,6 @@ def handle_request(self, request): request.end_headers() self.handled.set() - @unittest.skip('TODO: RUSTPYTHON; flaky test') def test_output(self): # The log message sent to the HTTPHandler is properly received. logger = logging.getLogger("http") diff --git a/Lib/test/test_marshal.py b/Lib/test/test_marshal.py index 2161e06b2f..142b45f6a4 100644 --- a/Lib/test/test_marshal.py +++ b/Lib/test/test_marshal.py @@ -35,7 +35,7 @@ def test_ints(self): self.helper(expected) n = n >> 1 - @unittest.skip("TODO: RUSTPYTHON; hang") + @unittest.expectedFailure # TODO: RUSTPYTHON def test_int64(self): # Simulate int marshaling with TYPE_INT64. maxint64 = (1 << 63) - 1 @@ -232,7 +232,7 @@ def check(s): self.assertRaises(ValueError, marshal.loads, s) run_tests(2**20, check) - @unittest.skip("TODO: RUSTPYTHON; segfault") + @unittest.expectedFailure # TODO: RUSTPYTHON; segfault def test_recursion_limit(self): # Create a deeply nested structure. head = last = [] diff --git a/Lib/test/test_signal.py b/Lib/test/test_signal.py index 578bee3172..2c5cec803d 100644 --- a/Lib/test/test_signal.py +++ b/Lib/test/test_signal.py @@ -1351,7 +1351,6 @@ def handler(signum, frame): # Python handler self.assertEqual(len(sigs), N, "Some signals were lost") - @unittest.skip('TODO: RUSTPYTHON; hang') @unittest.skipIf(is_apple, "crashes due to system bug (FB13453490)") @unittest.skipUnless(hasattr(signal, "SIGUSR1"), "test needs SIGUSR1") diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py index 08d3dcb579..57539a3862 100644 --- a/Lib/test/test_socket.py +++ b/Lib/test/test_socket.py @@ -6842,7 +6842,6 @@ def test_errors(self): @unittest.skipUnless(hasattr(os, "sendfile"), 'os.sendfile() required for this test.') -@unittest.skip("TODO: RUSTPYTHON; os.sendfile count parameter not handled correctly") class SendfileUsingSendfileTest(SendfileUsingSendTest): """ Test the sendfile() implementation of socket.sendfile(). @@ -6850,6 +6849,13 @@ class SendfileUsingSendfileTest(SendfileUsingSendTest): def meth_from_sock(self, sock): return getattr(sock, "_sendfile_use_sendfile") + @unittest.skip("TODO: RUSTPYTHON; os.sendfile count parameter not handled correctly; flaky") + def testWithTimeout(self): + super().testWithTimeout() + + @unittest.skip("TODO: RUSTPYTHON; os.sendfile count parameter not handled correctly; flaky") + def testCount(self): + super().testCount() @unittest.skipUnless(HAVE_SOCKET_ALG, 'AF_ALG required') class LinuxKernelCryptoAPI(unittest.TestCase): @@ -6867,8 +6873,7 @@ def create_alg(self, typ, name): # bpo-31705: On kernel older than 4.5, sendto() failed with ENOKEY, # at least on ppc64le architecture - # TODO: RUSTPYTHON - AF_ALG not fully implemented - @unittest.expectedFailure + @unittest.expectedFailure # TODO: RUSTPYTHON - AF_ALG not fully implemented @support.requires_linux_version(4, 5) def test_sha256(self): expected = bytes.fromhex("ba7816bf8f01cfea414140de5dae2223b00361a396" diff --git a/Lib/test/test_sort.py b/Lib/test/test_sort.py index be3d4a8461..37ce489b79 100644 --- a/Lib/test/test_sort.py +++ b/Lib/test/test_sort.py @@ -149,7 +149,7 @@ def __lt__(self, other): L = [C() for i in range(50)] self.assertRaises(ValueError, L.sort) - @unittest.skip("TODO: RUSTPYTHON; figure out how to detect sort mutation that doesn't change list length") + @unittest.expectedFailure # TODO: RUSTPYTHON; figure out how to detect sort mutation that doesn't change list length def test_undetected_mutation(self): # Python 2.4a1 did not always detect mutation memorywaster = [] diff --git a/Lib/test/test_sqlite3/test_dbapi.py b/Lib/test/test_sqlite3/test_dbapi.py index 9a95c489a3..a3ddd660cc 100644 --- a/Lib/test/test_sqlite3/test_dbapi.py +++ b/Lib/test/test_sqlite3/test_dbapi.py @@ -545,9 +545,6 @@ def test_connection_init_good_isolation_levels(self): cx.isolation_level = level self.assertEqual(cx.isolation_level, level) - # TODO: RUSTPYTHON - # @unittest.expectedFailure - @unittest.skip("TODO: RUSTPYTHON deadlock") def test_connection_reinit(self): db = ":memory:" cx = sqlite.connect(db) @@ -587,11 +584,11 @@ def test_connection_bad_reinit(self): ((v,) for v in range(3))) -@unittest.skip("TODO: RUSTPYTHON") class UninitialisedConnectionTests(unittest.TestCase): def setUp(self): self.cx = sqlite.Connection.__new__(sqlite.Connection) + @unittest.skip('TODO: RUSTPYTHON') def test_uninit_operations(self): funcs = ( lambda: self.cx.isolation_level, diff --git a/Lib/test/test_str.py b/Lib/test/test_str.py index 9d43a33cd9..6b766272a3 100644 --- a/Lib/test/test_str.py +++ b/Lib/test/test_str.py @@ -565,7 +565,6 @@ def __str__(self): return self.sval self.checkraises(TypeError, ' ', 'join', [1, 2, 3]) self.checkraises(TypeError, ' ', 'join', ['1', '2', 3]) - @unittest.skip('TODO: RUSTPYTHON; oom handling') @unittest.skipIf(sys.maxsize > 2**32, 'needs too much memory on a 64-bit platform') def test_join_overflow(self): @@ -1460,7 +1459,6 @@ def __getitem__(self, key): self.assertRaises(TypeError, '{a}'.format_map, []) self.assertRaises(ZeroDivisionError, '{a}'.format_map, BadMapping()) - @unittest.skip('TODO: RUSTPYTHON; killed for chewing up RAM') def test_format_huge_precision(self): format_string = ".{}f".format(sys.maxsize + 1) with self.assertRaises(ValueError): @@ -2468,7 +2466,6 @@ def test_printable_repr(self): # This test only affects 32-bit platforms because expandtabs can only take # an int as the max value, not a 64-bit C long. If expandtabs is changed # to take a 64-bit long, this test should apply to all platforms. - @unittest.skip('TODO: RUSTPYTHON; oom handling') @unittest.skipIf(sys.maxsize > (1 << 32) or struct.calcsize('P') != 4, 'only applies to 32-bit platforms') def test_expandtabs_overflows_gracefully(self): @@ -2479,7 +2476,7 @@ def test_expandtabs_optimization(self): s = 'abc' self.assertIs(s.expandtabs(), s) - @unittest.skip('TODO: RUSTPYTHON; aborted: memory allocation of 9223372036854775759 bytes failed') + @unittest.expectedFailure # TODO: RUSTPYTHON def test_raiseMemError(self): asciifields = "nnb" compactfields = asciifields + "nP" diff --git a/Lib/test/test_tarfile.py b/Lib/test/test_tarfile.py index d29c691823..92ce7c32a0 100644 --- a/Lib/test/test_tarfile.py +++ b/Lib/test/test_tarfile.py @@ -456,7 +456,6 @@ def test_premature_end_of_archive(self): with self.assertRaisesRegex(tarfile.ReadError, "unexpected end of data"): tar.extractfile(t).read() - @unittest.skip("TODO: RUSTPYTHON, infinite recursion") def test_length_zero_header(self): # bpo-39017 (CVE-2019-20907): reading a zero-length header should fail # with an exception diff --git a/Lib/test/test_thread.py b/Lib/test/test_thread.py index f55cf3656e..4ae8a833b9 100644 --- a/Lib/test/test_thread.py +++ b/Lib/test/test_thread.py @@ -105,7 +105,6 @@ def test_nt_and_posix_stack_size(self): thread.stack_size(0) - @unittest.skip("TODO: RUSTPYTHON, weakref destructors") def test__count(self): # Test the _count() function. orig = thread._count() diff --git a/Lib/test/test_threading.py b/Lib/test/test_threading.py index 910797afa8..e635a6f973 100644 --- a/Lib/test/test_threading.py +++ b/Lib/test/test_threading.py @@ -319,7 +319,7 @@ def f(mutex): # PyThreadState_SetAsyncExc() is a CPython-only gimmick, not (currently) # exposed at the Python level. This test relies on ctypes to get at it. - @unittest.skip('TODO: RUSTPYTHON; expects @cpython_only') + @cpython_only def test_PyThreadState_SetAsyncExc(self): ctypes = import_module("ctypes") @@ -424,7 +424,7 @@ def fail_new_thread(*args, **kwargs): finally: threading._start_joinable_thread = _start_joinable_thread - @unittest.skip('TODO: RUSTPYTHON; ctypes.pythonapi is not supported') + @unittest.expectedFailure # TODO: RUSTPYTHON; ctypes.pythonapi is not supported def test_finalize_running_thread(self): # Issue 1402: the PyGILState_Ensure / _Release functions may be called # very late on python exit: on deallocation of a running thread for diff --git a/Lib/test/test_time.py b/Lib/test/test_time.py index 31a2a920d9..df3a72e302 100644 --- a/Lib/test/test_time.py +++ b/Lib/test/test_time.py @@ -622,7 +622,6 @@ def test_large_year(self): self.assertEqual(self.yearstr(12345), '12345') self.assertEqual(self.yearstr(123456789), '123456789') -@unittest.skip("TODO: RUSTPYTHON, ValueError: invalid struct_time parameter") class _TestStrftimeYear: # Issue 13305: For years < 1000, the value is not always diff --git a/Lib/test/test_timeout.py b/Lib/test/test_timeout.py index f40c7ee48b..70a0175d77 100644 --- a/Lib/test/test_timeout.py +++ b/Lib/test/test_timeout.py @@ -71,7 +71,6 @@ def testTypeCheck(self): self.assertRaises(TypeError, self.sock.settimeout, {}) self.assertRaises(TypeError, self.sock.settimeout, 0j) - @unittest.skip("TODO: RUSTPYTHON; crash") def testRangeCheck(self): # Test range checking by settimeout() self.assertRaises(ValueError, self.sock.settimeout, -1)