mark and unmark successful/failing tests

This commit is contained in:
Jeong, YunWon committed 2026-01-18 20:00:15 +09:00
1 parent 3836958eaa
commit 8f7b1343bc
11 files changed
+12 -20

No files matched your search

-1
View File
@@ -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):
-1
View File
@@ -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)
-2
View File
@@ -3023,7 +3023,6 @@ class NodeTransformerTests(ASTTestMixin, BaseNodeVisitorCases, unittest.TestCase
self.assertASTTransformation(YieldRemover, code, expected)
@unittest.expectedFailure # TODO: RUSTPYTHON; <class 'object'> is not <class 'NoneType'>
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; <class 'object'> is not <class 'NoneType'>
def test_node_replace(self):
code = """
def func(arg):
-1
View File
@@ -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')
+6 -6
View File
@@ -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))
-2
View File
@@ -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,
-1
View File
@@ -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')
+2 -2
View File
@@ -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])
+2 -2
View File
@@ -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)
+2
View File
@@ -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)
-2
View File
@@ -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__')