diff --git a/Lib/test/test__colorize.py b/Lib/test/test__colorize.py index 31dc60fec..026277267 100644 --- a/Lib/test/test__colorize.py +++ b/Lib/test/test__colorize.py @@ -24,7 +24,6 @@ def supports_virtual_terminal(): class TestTheme(unittest.TestCase): - @unittest.expectedFailure # TODO: RUSTPYTHON def test_attributes(self): # only theme configurations attributes by default for field in dataclasses.fields(_colorize.Theme): diff --git a/Lib/test/test_argparse.py b/Lib/test/test_argparse.py index beda61be8..9b8179ef9 100644 --- a/Lib/test/test_argparse.py +++ b/Lib/test/test_argparse.py @@ -6824,7 +6824,6 @@ class TestInvalidNargs(TestCase): class TestImportStar(TestCase): - @unittest.expectedFailure # TODO: RUSTPYTHON def test(self): for name in argparse.__all__: self.assertHasAttr(argparse, name) diff --git a/Lib/test/test_ast/test_ast.py b/Lib/test/test_ast/test_ast.py index 57c19477a..530993977 100644 --- a/Lib/test/test_ast/test_ast.py +++ b/Lib/test/test_ast/test_ast.py @@ -3023,7 +3023,6 @@ class NodeTransformerTests(ASTTestMixin, BaseNodeVisitorCases, unittest.TestCase self.assertASTTransformation(YieldRemover, code, expected) - @unittest.expectedFailure # TODO: RUSTPYTHON; is not def test_node_return_list(self): code = """ class DSL(Base, kw1=True): ... @@ -3064,7 +3063,6 @@ class NodeTransformerTests(ASTTestMixin, BaseNodeVisitorCases, unittest.TestCase self.assertASTTransformation(PrintToLog, code, expected) - @unittest.expectedFailure # TODO: RUSTPYTHON; is not def test_node_replace(self): code = """ def func(arg): diff --git a/Lib/test/test_calendar.py b/Lib/test/test_calendar.py index 35573fd9f..7ade4271b 100644 --- a/Lib/test/test_calendar.py +++ b/Lib/test/test_calendar.py @@ -1090,7 +1090,6 @@ class CommandLineTestCase(unittest.TestCase): output = run('--months', '1', '2004') self.assertIn(conv('\nMo Tu We Th Fr Sa Su\n'), output) - @unittest.expectedFailure # TODO: RUSTPYTHON def test_option_type(self): self.assertFailure('-t') self.assertFailure('--type') diff --git a/Lib/test/test_int.py b/Lib/test/test_int.py index 1ab7a1fb6..7f62ac067 100644 --- a/Lib/test/test_int.py +++ b/Lib/test/test_int.py @@ -681,7 +681,7 @@ class IntStrDigitLimitsTests(unittest.TestCase): digits = 78_268 with ( support.adjust_int_max_str_digits(digits), - support.CPUStopwatch() as sw_convert): + support.Stopwatch() as sw_convert): huge_decimal = str(huge_int) self.assertEqual(len(huge_decimal), digits) # Ensuring that we chose a slow enough conversion to measure. @@ -696,7 +696,7 @@ class IntStrDigitLimitsTests(unittest.TestCase): with support.adjust_int_max_str_digits(int(.995 * digits)): with ( self.assertRaises(ValueError) as err, - support.CPUStopwatch() as sw_fail_huge): + support.Stopwatch() as sw_fail_huge): str(huge_int) self.assertIn('conversion', str(err.exception)) self.assertLessEqual(sw_fail_huge.seconds, sw_convert.seconds/2) @@ -706,7 +706,7 @@ class IntStrDigitLimitsTests(unittest.TestCase): extra_huge_int = int(f'0x{"c"*500_000}', base=16) # 602060 digits. with ( self.assertRaises(ValueError) as err, - support.CPUStopwatch() as sw_fail_extra_huge): + support.Stopwatch() as sw_fail_extra_huge): # If not limited, 8 seconds said Zen based cloud VM. str(extra_huge_int) self.assertIn('conversion', str(err.exception)) @@ -722,7 +722,7 @@ class IntStrDigitLimitsTests(unittest.TestCase): huge = '8'*digits with ( support.adjust_int_max_str_digits(digits), - support.CPUStopwatch() as sw_convert): + support.Stopwatch() as sw_convert): int(huge) # Ensuring that we chose a slow enough conversion to measure. # It takes 0.1 seconds on a Zen based cloud VM in an opt build. @@ -734,7 +734,7 @@ class IntStrDigitLimitsTests(unittest.TestCase): with support.adjust_int_max_str_digits(digits - 1): with ( self.assertRaises(ValueError) as err, - support.CPUStopwatch() as sw_fail_huge): + support.Stopwatch() as sw_fail_huge): int(huge) self.assertIn('conversion', str(err.exception)) self.assertLessEqual(sw_fail_huge.seconds, sw_convert.seconds/2) @@ -744,7 +744,7 @@ class IntStrDigitLimitsTests(unittest.TestCase): extra_huge = '7'*1_200_000 with ( self.assertRaises(ValueError) as err, - support.CPUStopwatch() as sw_fail_extra_huge): + support.Stopwatch() as sw_fail_extra_huge): # If not limited, 8 seconds in the Zen based cloud VM. int(extra_huge) self.assertIn('conversion', str(err.exception)) diff --git a/Lib/test/test_json/test_fail.py b/Lib/test/test_json/test_fail.py index 48c974a33..cb88e317b 100644 --- a/Lib/test/test_json/test_fail.py +++ b/Lib/test/test_json/test_fail.py @@ -99,8 +99,6 @@ class TestFail: 'keys must be str, int, float, bool or None, not tuple'): self.dumps(data) - # TODO: RUSTPYTHON - @unittest.expectedFailure def test_not_serializable(self): import sys with self.assertRaisesRegex(TypeError, diff --git a/Lib/test/test_json/test_tool.py b/Lib/test/test_json/test_tool.py index c60e58526..068a7acb6 100644 --- a/Lib/test/test_json/test_tool.py +++ b/Lib/test/test_json/test_tool.py @@ -165,7 +165,6 @@ class TestMain(unittest.TestCase): self.assertEqual(process.stdout, self.jsonlines_expect) self.assertEqual(process.stderr, '') - @unittest.expectedFailure # TODO: RUSTPYTHON def test_help_flag(self): rc, out, err = assert_python_ok('-m', self.module, '-h', PYTHON_COLORS='0') diff --git a/Lib/test/test_re.py b/Lib/test/test_re.py index 7c5bfba41..04c8ee71a 100644 --- a/Lib/test/test_re.py +++ b/Lib/test/test_re.py @@ -1,7 +1,7 @@ from test.support import (gc_collect, bigmemtest, _2G, cpython_only, captured_stdout, check_disallow_instantiation, is_emscripten, is_wasi, - warnings_helper, SHORT_TIMEOUT, CPUStopwatch, requires_resource) + warnings_helper, SHORT_TIMEOUT, Stopwatch, requires_resource) import locale import re import string @@ -2487,7 +2487,7 @@ class ReTests(unittest.TestCase): @requires_resource('cpu') def test_search_anchor_at_beginning(self): s = 'x'*10**7 - with CPUStopwatch() as stopwatch: + with Stopwatch() as stopwatch: for p in r'\Ay', r'^y': self.assertIsNone(re.search(p, s)) self.assertEqual(re.split(p, s), [s]) diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py index 9f09413f5..ba038f18b 100644 --- a/Lib/test/test_regrtest.py +++ b/Lib/test/test_regrtest.py @@ -24,7 +24,7 @@ import unittest from xml.etree import ElementTree from test import support -from test.support import os_helper, without_optimizer +from test.support import os_helper, requires_jit_disabled from test.libregrtest import cmdline from test.libregrtest import main from test.libregrtest import setup @@ -1245,7 +1245,7 @@ class ArgsTestCase(BaseTestCase): stats=TestStats(4, 1), forever=True) - @without_optimizer + @requires_jit_disabled def check_leak(self, code, what, *, run_workers=False): test = self.create_test('huntrleaks', code=code) diff --git a/Lib/test/test_support.py b/Lib/test/test_support.py index 813a639d1..481be2bff 100644 --- a/Lib/test/test_support.py +++ b/Lib/test/test_support.py @@ -460,6 +460,7 @@ class TestSupport(unittest.TestCase): self.OtherClass, self.RefClass, ignore=ignore) self.assertEqual(set(), missing_items) + @unittest.expectedFailure # TODO: RUSTPYTHON def test_check__all__(self): extra = {'tempdir'} not_exported = {'template'} @@ -615,6 +616,7 @@ class TestSupport(unittest.TestCase): self.check_print_warning("a\nb", 'Warning -- a\nWarning -- b\n') + @unittest.expectedFailureIf(sys.platform != "win32", "TODO: RUSTPYTHON; no has_strftime_extensions yet") def test_has_strftime_extensions(self): if sys.platform == "win32": self.assertFalse(support.has_strftime_extensions) diff --git a/Lib/test/test_warnings/__init__.py b/Lib/test/test_warnings/__init__.py index fb324294f..abdf7b32d 100644 --- a/Lib/test/test_warnings/__init__.py +++ b/Lib/test/test_warnings/__init__.py @@ -101,7 +101,6 @@ class PublicAPITests(BaseTest): public API. """ - @unittest.expectedFailure # TODO: RUSTPYTHON 'PyPublicAPITests' object has no attribute 'assertHasAttr' def test_module_all_attribute(self): self.assertHasAttr(self.module, '__all__') target_api = ["warn", "warn_explicit", "showwarning", @@ -851,7 +850,6 @@ class PyWarnTests(WarnTests, unittest.TestCase): # As an early adopter, we sanity check the # test.import_helper.import_fresh_module utility function - @unittest.expectedFailure # TODO: RUSTPYTHON 'PyWarnTests' object has no attribute 'assertHasAttr' def test_pure_python(self): self.assertIsNot(original_warnings, self.module) self.assertHasAttr(self.module.warn, '__code__')