diff options
author | Nice Zombies <nineteendo19d0@gmail.com> | 2024-06-18 15:22:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-18 15:22:24 (GMT) |
commit | 1035fe0cfbeee23f61aed3332ebbae854e5da800 (patch) | |
tree | 80b5c71bfd21f038e009f81d7901e5f73d676586 /Lib/test/test_interpreters | |
parent | f869bcfc5bd4755c7c1d6a00b82919543c8ee6e5 (diff) | |
download | cpython-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__.py | 9 |
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) |