]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[3.13] gh-117953: Skip `test_interpreters` properly without GIL (gh-120707)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Tue, 18 Jun 2024 16:05:30 +0000 (18:05 +0200)
committerGitHub <noreply@github.com>
Tue, 18 Jun 2024 16:05:30 +0000 (16:05 +0000)
(cherry picked from commit 1035fe0cfbeee23f61aed3332ebbae854e5da800, AKA gh-120689)

Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
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)