]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.14] gh-132542: Only run test_native_id_after_fork if native_id is supported (GH...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Wed, 21 May 2025 11:38:37 +0000 (13:38 +0200)
committerGitHub <noreply@github.com>
Wed, 21 May 2025 11:38:37 +0000 (11:38 +0000)
(cherry picked from commit e6dde10a69ce62c3b02b3b4e07559d06a9451fc2)

Co-authored-by: Noam Cohen <noam@noam.me>
Lib/test/test_threading.py

index dc7172db04c5b78a510fce62a9454d744a5c0953..a9a354647f56ca89ea61429dca225408ef29c796 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