]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
gh-117953: Skip `test_interpreters` properly without GIL (#120689)
authorNice Zombies <nineteendo19d0@gmail.com>
Tue, 18 Jun 2024 15:22:24 +0000 (17:22 +0200)
committerGitHub <noreply@github.com>
Tue, 18 Jun 2024 15:22:24 +0000 (15:22 +0000)
Lib/test/test_interpreters/__init__.py

index 52ff553f60d0d75f64b1d5b06ae2ddadd6666b18..e3d189c4efcd2777e6936c2c6b3229d41238b874 100644 (file)
@@ -1,6 +1,9 @@
 import os
 from test.support import load_package_tests, Py_GIL_DISABLED
+import unittest
 
-if not Py_GIL_DISABLED:
-    def load_tests(*args):
-        return load_package_tests(os.path.dirname(__file__), *args)
+if Py_GIL_DISABLED:
+    raise unittest.SkipTest("GIL disabled")
+
+def load_tests(*args):
+    return load_package_tests(os.path.dirname(__file__), *args)