Skip to content

Commit 8f7b134

Browse files
committed
mark and unmark successful/failing tests
1 parent 3836958 commit 8f7b134

11 files changed

Lines changed: 12 additions & 20 deletions

File tree

Lib/test/test__colorize.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ def supports_virtual_terminal():
2424

2525
class TestTheme(unittest.TestCase):
2626

27-
@unittest.expectedFailure # TODO: RUSTPYTHON
2827
def test_attributes(self):
2928
# only theme configurations attributes by default
3029
for field in dataclasses.fields(_colorize.Theme):

Lib/test/test_argparse.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6824,7 +6824,6 @@ def test_nargs_zero(self):
68246824

68256825
class TestImportStar(TestCase):
68266826

6827-
@unittest.expectedFailure # TODO: RUSTPYTHON
68286827
def test(self):
68296828
for name in argparse.__all__:
68306829
self.assertHasAttr(argparse, name)

Lib/test/test_ast/test_ast.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3023,7 +3023,6 @@ def visit_Expr(self, node: ast.Expr):
30233023

30243024
self.assertASTTransformation(YieldRemover, code, expected)
30253025

3026-
@unittest.expectedFailure # TODO: RUSTPYTHON; <class 'object'> is not <class 'NoneType'>
30273026
def test_node_return_list(self):
30283027
code = """
30293028
class DSL(Base, kw1=True): ...
@@ -3064,7 +3063,6 @@ def visit_Call(self, node: ast.Call):
30643063

30653064
self.assertASTTransformation(PrintToLog, code, expected)
30663065

3067-
@unittest.expectedFailure # TODO: RUSTPYTHON; <class 'object'> is not <class 'NoneType'>
30683066
def test_node_replace(self):
30693067
code = """
30703068
def func(arg):

Lib/test/test_calendar.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1090,7 +1090,6 @@ def test_option_months(self):
10901090
output = run('--months', '1', '2004')
10911091
self.assertIn(conv('\nMo Tu We Th Fr Sa Su\n'), output)
10921092

1093-
@unittest.expectedFailure # TODO: RUSTPYTHON
10941093
def test_option_type(self):
10951094
self.assertFailure('-t')
10961095
self.assertFailure('--type')

Lib/test/test_int.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -681,7 +681,7 @@ def test_denial_of_service_prevented_int_to_str(self):
681681
digits = 78_268
682682
with (
683683
support.adjust_int_max_str_digits(digits),
684-
support.CPUStopwatch() as sw_convert):
684+
support.Stopwatch() as sw_convert):
685685
huge_decimal = str(huge_int)
686686
self.assertEqual(len(huge_decimal), digits)
687687
# Ensuring that we chose a slow enough conversion to measure.
@@ -696,7 +696,7 @@ def test_denial_of_service_prevented_int_to_str(self):
696696
with support.adjust_int_max_str_digits(int(.995 * digits)):
697697
with (
698698
self.assertRaises(ValueError) as err,
699-
support.CPUStopwatch() as sw_fail_huge):
699+
support.Stopwatch() as sw_fail_huge):
700700
str(huge_int)
701701
self.assertIn('conversion', str(err.exception))
702702
self.assertLessEqual(sw_fail_huge.seconds, sw_convert.seconds/2)
@@ -706,7 +706,7 @@ def test_denial_of_service_prevented_int_to_str(self):
706706
extra_huge_int = int(f'0x{"c"*500_000}', base=16) # 602060 digits.
707707
with (
708708
self.assertRaises(ValueError) as err,
709-
support.CPUStopwatch() as sw_fail_extra_huge):
709+
support.Stopwatch() as sw_fail_extra_huge):
710710
# If not limited, 8 seconds said Zen based cloud VM.
711711
str(extra_huge_int)
712712
self.assertIn('conversion', str(err.exception))
@@ -722,7 +722,7 @@ def test_denial_of_service_prevented_str_to_int(self):
722722
huge = '8'*digits
723723
with (
724724
support.adjust_int_max_str_digits(digits),
725-
support.CPUStopwatch() as sw_convert):
725+
support.Stopwatch() as sw_convert):
726726
int(huge)
727727
# Ensuring that we chose a slow enough conversion to measure.
728728
# It takes 0.1 seconds on a Zen based cloud VM in an opt build.
@@ -734,7 +734,7 @@ def test_denial_of_service_prevented_str_to_int(self):
734734
with support.adjust_int_max_str_digits(digits - 1):
735735
with (
736736
self.assertRaises(ValueError) as err,
737-
support.CPUStopwatch() as sw_fail_huge):
737+
support.Stopwatch() as sw_fail_huge):
738738
int(huge)
739739
self.assertIn('conversion', str(err.exception))
740740
self.assertLessEqual(sw_fail_huge.seconds, sw_convert.seconds/2)
@@ -744,7 +744,7 @@ def test_denial_of_service_prevented_str_to_int(self):
744744
extra_huge = '7'*1_200_000
745745
with (
746746
self.assertRaises(ValueError) as err,
747-
support.CPUStopwatch() as sw_fail_extra_huge):
747+
support.Stopwatch() as sw_fail_extra_huge):
748748
# If not limited, 8 seconds in the Zen based cloud VM.
749749
int(extra_huge)
750750
self.assertIn('conversion', str(err.exception))

Lib/test/test_json/test_fail.py

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,8 +99,6 @@ def test_non_string_keys_dict(self):
9999
'keys must be str, int, float, bool or None, not tuple'):
100100
self.dumps(data)
101101

102-
# TODO: RUSTPYTHON
103-
@unittest.expectedFailure
104102
def test_not_serializable(self):
105103
import sys
106104
with self.assertRaisesRegex(TypeError,

Lib/test/test_json/test_tool.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,6 @@ def test_jsonlines(self):
165165
self.assertEqual(process.stdout, self.jsonlines_expect)
166166
self.assertEqual(process.stderr, '')
167167

168-
@unittest.expectedFailure # TODO: RUSTPYTHON
169168
def test_help_flag(self):
170169
rc, out, err = assert_python_ok('-m', self.module, '-h',
171170
PYTHON_COLORS='0')

Lib/test/test_re.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
from test.support import (gc_collect, bigmemtest, _2G,
22
cpython_only, captured_stdout,
33
check_disallow_instantiation, is_emscripten, is_wasi,
4-
warnings_helper, SHORT_TIMEOUT, CPUStopwatch, requires_resource)
4+
warnings_helper, SHORT_TIMEOUT, Stopwatch, requires_resource)
55
import locale
66
import re
77
import string
@@ -2487,7 +2487,7 @@ def test_bug_40736(self):
24872487
@requires_resource('cpu')
24882488
def test_search_anchor_at_beginning(self):
24892489
s = 'x'*10**7
2490-
with CPUStopwatch() as stopwatch:
2490+
with Stopwatch() as stopwatch:
24912491
for p in r'\Ay', r'^y':
24922492
self.assertIsNone(re.search(p, s))
24932493
self.assertEqual(re.split(p, s), [s])

Lib/test/test_regrtest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
from xml.etree import ElementTree
2525

2626
from test import support
27-
from test.support import os_helper, without_optimizer
27+
from test.support import os_helper, requires_jit_disabled
2828
from test.libregrtest import cmdline
2929
from test.libregrtest import main
3030
from test.libregrtest import setup
@@ -1245,7 +1245,7 @@ def test_run(self):
12451245
stats=TestStats(4, 1),
12461246
forever=True)
12471247

1248-
@without_optimizer
1248+
@requires_jit_disabled
12491249
def check_leak(self, code, what, *, run_workers=False):
12501250
test = self.create_test('huntrleaks', code=code)
12511251

Lib/test/test_support.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -460,6 +460,7 @@ def test_detect_api_mismatch__ignore(self):
460460
self.OtherClass, self.RefClass, ignore=ignore)
461461
self.assertEqual(set(), missing_items)
462462

463+
@unittest.expectedFailure # TODO: RUSTPYTHON
463464
def test_check__all__(self):
464465
extra = {'tempdir'}
465466
not_exported = {'template'}
@@ -615,6 +616,7 @@ def test_print_warning(self):
615616
self.check_print_warning("a\nb",
616617
'Warning -- a\nWarning -- b\n')
617618

619+
@unittest.expectedFailureIf(sys.platform != "win32", "TODO: RUSTPYTHON; no has_strftime_extensions yet")
618620
def test_has_strftime_extensions(self):
619621
if sys.platform == "win32":
620622
self.assertFalse(support.has_strftime_extensions)

0 commit comments

Comments
 (0)