]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-132542: Only run test_native_id_after_fork if native_id is supported (GH-134408)
authorNoam Cohen <noam@noam.me>
Wed, 21 May 2025 11:10:57 +0000 (14:10 +0300)
committerGitHub <noreply@github.com>
Wed, 21 May 2025 11:10:57 +0000 (14:10 +0300)
Lib/test/test_threading.py

index a9eec139bec8bf70ad5124c370c0689d195fd117..0e51e7fc8c5a76c89cbf9f0b9a77ca95bfd19a2a 100644 (file)
@@ -1353,6 +1353,7 @@ class ThreadTests(BaseTestCase):
         assert_python_ok("-c", script)
 
     @skip_unless_reliable_fork
+    @unittest.skipUnless(hasattr(threading, 'get_native_id'), "test needs threading.get_native_id()")
     def test_native_id_after_fork(self):
         script = """if True:
             import threading