summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_interpreters
diff options
context:
space:
mode:
authorNice Zombies <nineteendo19d0@gmail.com>2024-06-18 15:22:24 (GMT)
committerGitHub <noreply@github.com>2024-06-18 15:22:24 (GMT)
commit1035fe0cfbeee23f61aed3332ebbae854e5da800 (patch)
tree80b5c71bfd21f038e009f81d7901e5f73d676586 /Lib/test/test_interpreters
parentf869bcfc5bd4755c7c1d6a00b82919543c8ee6e5 (diff)
downloadcpython-1035fe0cfbeee23f61aed3332ebbae854e5da800.zip
cpython-1035fe0cfbeee23f61aed3332ebbae854e5da800.tar.gz
cpython-1035fe0cfbeee23f61aed3332ebbae854e5da800.tar.bz2
gh-117953: Skip `test_interpreters` properly without GIL (#120689)
Diffstat (limited to 'Lib/test/test_interpreters')
-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)