From 40393ecc2ada9f01b4eb4e7c81c6f43016134afc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?St=C3=A9phane=20Lozier?= Date: Fri, 4 Dec 2026 12:36:16 -0500 Subject: [PATCH] Enable some test_threading tests --- tests/suite/stdlib/test_threading.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/tests/suite/stdlib/test_threading.py b/tests/suite/stdlib/test_threading.py index ebbd9bff2..4eb44873b 100644 --- a/tests/suite/stdlib/test_threading.py +++ b/tests/suite/stdlib/test_threading.py @@ -23,8 +23,6 @@ def load_tests(loader, standard_tests, pattern): test.test_threading.CRLockTests('test_weakref_exists'), # TypeError: cannot create weak reference to 'RLock' object test.test_threading.LockTests('test_weakref_deleted'), # TypeError: cannot create weak reference to 'lock' object test.test_threading.LockTests('test_weakref_exists'), # TypeError: cannot create weak reference to 'lock' object - test.test_threading.ConditionAsRLockTests('test_weakref_deleted'), # AssertionError - test.test_threading.PyRLockTests('test_weakref_deleted'), # AssertionError test.test_threading.ThreadTests('test_main_thread_during_shutdown'), # AssertionError ] @@ -42,6 +40,11 @@ def load_tests(loader, standard_tests, pattern): skip_tests += [ test.test_threading.ThreadJoinOnShutdown('test_4_daemon_threads'), # SystemError: Thread was being aborted ] + if sys.version_info >= (3, 6): + skip_tests += [ + test.test_threading.ConditionAsRLockTests('test_weakref_deleted'), # AssertionError: conservative GC keeps the lock alive + test.test_threading.PyRLockTests('test_weakref_deleted'), # AssertionError: conservative GC keeps the lock alive + ] return generate_suite(tests, failing_tests, skip_tests)