summaryrefslogtreecommitdiffstats
path: root/Lib
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2024-06-18 16:05:30 (GMT)
committerGitHub <noreply@github.com>2024-06-18 16:05:30 (GMT)
commit07145ddf19bc423e83d0290095833bc95861fc2f (patch)
tree9eca82ffb046d093c4d3174fa711269562b73735 /Lib
parent1ce59849610fe03beebcddfacb3d055a7074ef16 (diff)
downloadcpython-07145ddf19bc423e83d0290095833bc95861fc2f.zip
cpython-07145ddf19bc423e83d0290095833bc95861fc2f.tar.gz
cpython-07145ddf19bc423e83d0290095833bc95861fc2f.tar.bz2
[3.13] gh-117953: Skip `test_interpreters` properly without GIL (gh-120707)
(cherry picked from commit 1035fe0cfbeee23f61aed3332ebbae854e5da800, AKA gh-120689) Co-authored-by: Nice Zombies <nineteendo19d0@gmail.com>
Diffstat (limited to 'Lib')
-rw-r--r--Lib/test/test_interpreters/__init__.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/Lib/test/test_interpreters/__init__.py b/Lib/test/test_interpreters/__init__.py
index 52ff553..e3d189c 100644
--- a/Lib/test/test_interpreters/__init__.py
+++ b/Lib/test/test_interpreters/__init__.py
@@ -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)