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)