Skip to content

Commit 76c356c

Browse files
committed
Unskip passing flaky CPython tests
Remove RUSTPYTHON skip overlays after Linux release repeats passed for enum, threading, logging, subprocess, socket, int, re, strtod, and regrtest cases. Assisted-by: Grok:4.6
1 parent 54420c4 commit 76c356c

11 files changed

Lines changed: 0 additions & 40 deletions

‎Lib/test/test_enum.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3972,7 +3972,6 @@ class Color(StrMixin, AllMixin, Flag):
39723972
self.assertEqual(Color.ALL.value, 7)
39733973
self.assertEqual(str(Color.BLUE), 'blue')
39743974

3975-
@unittest.skip("TODO: RUSTPYTHON; flaky test")
39763975
@threading_helper.reap_threads
39773976
@threading_helper.requires_working_threading()
39783977
def test_unique_composite(self):
@@ -4493,7 +4492,6 @@ class Color(StrMixin, AllMixin, IntFlag):
44934492
self.assertEqual(Color.ALL.value, 7)
44944493
self.assertEqual(str(Color.BLUE), 'blue')
44954494

4496-
@unittest.skip("TODO: RUSTPYTHON; flaky test")
44974495
@threading_helper.reap_threads
44984496
@threading_helper.requires_working_threading()
44994497
def test_unique_composite(self):

‎Lib/test/test_importlib/test_locks.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,6 @@ def test_deadlock(self):
109109
self.assertGreaterEqual(nb_deadlocks, 1)
110110
self.assertEqual(results.count((True, True)), len(results) - nb_deadlocks)
111111

112-
@unittest.skip("TODO: RUSTPYTHON; flaky test")
113112
def test_no_deadlock(self):
114113
results = self.run_deadlock_avoidance_test(False)
115114
self.assertEqual(results.count((True, False)), 0)

‎Lib/test/test_int.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -630,7 +630,6 @@ def test_denial_of_service_prevented_int_to_str(self):
630630
self.assertIn('conversion', str(err.exception))
631631
self.assertLess(sw_fail_extra_huge.seconds, sw_convert.seconds/2)
632632

633-
@unittest.skip("TODO: RUSTPYTHON; flaky test")
634633
def test_denial_of_service_prevented_str_to_int(self):
635634
"""Regression test: ensure we fail before performing O(N**2) work."""
636635
maxdigits = sys.get_int_max_str_digits()

‎Lib/test/test_logging.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -731,7 +731,6 @@ def remove_loop(fname, tries):
731731
# based on os.fork existing because that is what users and this test use.
732732
# This helps ensure that when fork exists (the important concept) that the
733733
# register_at_fork mechanism is also present and used.
734-
@unittest.skip("TODO: RUSTPYTHON; Flaky")
735734
@support.requires_fork()
736735
@threading_helper.requires_working_threading()
737736
@skip_if_asan_fork
@@ -4109,7 +4108,6 @@ def _mpinit_issue121723(qspec, message_to_log):
41094108
# log a message (this creates a record put in the queue)
41104109
logging.getLogger().info(message_to_log)
41114110

4112-
@unittest.skip("TODO: RUSTPYTHON; flaky EOFError")
41134111
@unittest.expectedFailureIfWindows("TODO: RUSTPYTHON; SemLock not implemented on Windows")
41144112
@skip_if_tsan_fork
41154113
@support.requires_subprocess()

‎Lib/test/test_re.py‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2476,7 +2476,6 @@ def test_bug_40736(self):
24762476

24772477
# gh-117594: The test is not slow by itself, but it relies on
24782478
# the absolute computation time and can fail on very slow computers.
2479-
@unittest.skip("TODO: RUSTPYTHON; flaky, improve perf")
24802479
@requires_resource('cpu')
24812480
def test_search_anchor_at_beginning(self):
24822481
s = 'x'*10**7

‎Lib/test/test_regrtest.py‎

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -915,7 +915,6 @@ def test_script_regrtest(self):
915915
args = [*self.python_args, script, *self.regrtest_args, *self.tests]
916916
self.run_tests(args)
917917

918-
@unittest.skip("TODO: RUSTPYTHON; flaky")
919918
def test_module_test(self):
920919
# -m test
921920
args = [*self.python_args, '-m', 'test',
@@ -928,22 +927,19 @@ def test_module_regrtest(self):
928927
*self.regrtest_args, *self.tests]
929928
self.run_tests(args)
930929

931-
@unittest.skip("TODO: RUSTPYTHON; flaky")
932930
def test_module_autotest(self):
933931
# -m test.autotest
934932
args = [*self.python_args, '-m', 'test.autotest',
935933
*self.regrtest_args, *self.tests]
936934
self.run_tests(args)
937935

938-
@unittest.skip("TODO: RUSTPYTHON; flaky")
939936
def test_module_from_test_autotest(self):
940937
# from test import autotest
941938
code = 'from test import autotest'
942939
args = [*self.python_args, '-c', code,
943940
*self.regrtest_args, *self.tests]
944941
self.run_tests(args)
945942

946-
@unittest.skip("TODO: RUSTPYTHON; flaky")
947943
def test_script_autotest(self):
948944
# Lib/test/autotest.py
949945
script = os.path.join(self.testdir, 'autotest.py')
@@ -2034,7 +2030,6 @@ def test_cleanup(self):
20342030
for name in names:
20352031
self.assertFalse(os.path.exists(name), name)
20362032

2037-
@unittest.skip("TODO: RUSTPYTHON; flaky")
20382033
@unittest.skipIf(support.is_wasi,
20392034
'checking temp files is not implemented on WASI')
20402035
def test_leak_tmp_file(self):
@@ -2186,11 +2181,9 @@ def test_randint(self):
21862181
def test_random_seed(self):
21872182
self._check_random_seed(run_workers=False)
21882183

2189-
@unittest.skip("TODO: RUSTPYTHON; flaky")
21902184
def test_random_seed_workers(self):
21912185
self._check_random_seed(run_workers=True)
21922186

2193-
@unittest.skip("TODO: RUSTPYTHON; flaky")
21942187
def test_python_command(self):
21952188
code = textwrap.dedent(r"""
21962189
import sys

‎Lib/test/test_socket.py‎

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7066,14 +7066,6 @@ class SendfileUsingSendfileTest(SendfileUsingSendTest):
70667066
def meth_from_sock(self, sock):
70677067
return getattr(sock, "_sendfile_use_sendfile")
70687068

7069-
@unittest.skip("TODO: RUSTPYTHON; os.sendfile count parameter not handled correctly; flaky")
7070-
def testCount(self):
7071-
return super().testCount()
7072-
7073-
@unittest.skip("TODO: RUSTPYTHON; os.sendfile count parameter not handled correctly; flaky")
7074-
def testWithTimeout(self):
7075-
return super().testWithTimeout()
7076-
70777069

70787070
@unittest.skipUnless(HAVE_SOCKET_ALG, 'AF_ALG required')
70797071
class LinuxKernelCryptoAPI(unittest.TestCase):

‎Lib/test/test_strtod.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,7 +146,6 @@ def test_short_halfway_cases(self):
146146
digits *= 5
147147
exponent -= 1
148148

149-
@unittest.skip("TODO: RUSTPYTHON; fails on debug mode, flaky in release mode")
150149
def test_halfway_cases(self):
151150
# test halfway cases for the round-half-to-even rule
152151
for i in range(100 * TEST_SIZE):
@@ -213,7 +212,6 @@ def test_bigcomp(self):
213212
s = '{}e{}'.format(digits, exponent)
214213
self.check_strtod(s)
215214

216-
@unittest.skip("TODO: RUSTPYTHON; flaky test")
217215
def test_parsing(self):
218216
# make '0' more likely to be chosen than other digits
219217
digits = '000000123456789'

‎Lib/test/test_subprocess.py‎

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3051,7 +3051,6 @@ def kill_p2():
30513051
p1.stdout.close()
30523052
p2.stdout.close()
30533053

3054-
@unittest.skip("TODO: RUSTPYTHON; flaky test")
30553054
def test_close_fds(self):
30563055
fd_status = support.findfile("fd_status.py", subdir="subprocessdata")
30573056

@@ -3183,7 +3182,6 @@ def test_close_fds_when_max_fd_is_lowered(self):
31833182
# descriptor of a pipe closed in the parent process is valid in the
31843183
# child process according to fstat(), but the mode of the file
31853184
# descriptor is invalid, and read or write raise an error.
3186-
@unittest.skip("TODO: RUSTPYTHON; flaky test")
31873185
@support.requires_mac_ver(10, 5)
31883186
def test_pass_fds(self):
31893187
fd_status = support.findfile("fd_status.py", subdir="subprocessdata")

‎Lib/test/test_threading.py‎

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -685,7 +685,6 @@ def background_thread(evt):
685685
self.assertEqual(out, b'')
686686
self.assertEqual(err, b'')
687687

688-
@unittest.skip("TODO: RUSTPYTHON; flaky")
689688
@skip_unless_reliable_fork
690689
def test_is_alive_after_fork(self):
691690
# Try hard to trigger #18418: is_alive() could sometimes be True on
@@ -749,7 +748,6 @@ def test_main_thread_after_fork(self):
749748
"main ident True\n"
750749
"current is main True\n")
751750

752-
@unittest.skip("TODO: RUSTPYTHON; flaky; process timeout after fork")
753751
@skip_unless_reliable_fork
754752
@unittest.skipUnless(hasattr(os, 'waitpid'), "test needs os.waitpid()")
755753
def test_main_thread_after_fork_from_nonmain_thread(self):
@@ -1470,7 +1468,6 @@ def test_2_join_in_forked_process(self):
14701468
"""
14711469
self._run_and_join(script)
14721470

1473-
@unittest.skip("TODO: RUSTPYTHON; flaky test")
14741471
@skip_unless_reliable_fork
14751472
def test_3_join_in_forked_from_thread(self):
14761473
# Like the test above, but fork() was called from a worker thread
@@ -1852,7 +1849,6 @@ def test_releasing_unacquired_lock(self):
18521849
lock = threading.Lock()
18531850
self.assertRaises(RuntimeError, lock.release)
18541851

1855-
@unittest.skip("TODO: RUSTPYTHON; flaky test")
18561852
@requires_subprocess()
18571853
def test_recursion_limit(self):
18581854
# Issue 9670
@@ -2236,10 +2232,6 @@ def __init__(self, a, *, b) -> None:
22362232
CustomRLock(1, b=2)
22372233
self.assertEqual(warnings_log, [])
22382234

2239-
@unittest.skip("TODO: RUSTPYTHON; flaky test")
2240-
def test_different_thread(self):
2241-
return super().test_different_thread()
2242-
22432235
class EventTests(lock_tests.EventTests):
22442236
eventtype = staticmethod(threading.Event)
22452237

@@ -2250,10 +2242,6 @@ class ConditionAsRLockTests(lock_tests.RLockTests):
22502242
def test_recursion_count(self):
22512243
self.skipTest("Condition does not expose _recursion_count()")
22522244

2253-
@unittest.skip("TODO: RUSTPYTHON; flaky test")
2254-
def test_different_thread(self):
2255-
return super().test_different_thread()
2256-
22572245
class ConditionTests(lock_tests.ConditionTests):
22582246
condtype = staticmethod(threading.Condition)
22592247

@@ -2413,7 +2401,6 @@ def check_interrupt_main_noerror(self, signum):
24132401
# Restore original handler
24142402
signal.signal(signum, handler)
24152403

2416-
@unittest.skip("TODO: RUSTPYTHON; flaky")
24172404
@requires_gil_enabled("gh-118433: Flaky due to a longstanding bug")
24182405
def test_interrupt_main_subthread(self):
24192406
# Calling start_new_thread with a function that executes interrupt_main

0 commit comments

Comments
 (0)