diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2024-06-18 16:05:30 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-06-18 16:05:30 (GMT) |
commit | 07145ddf19bc423e83d0290095833bc95861fc2f (patch) | |
tree | 9eca82ffb046d093c4d3174fa711269562b73735 | |
parent | 1ce59849610fe03beebcddfacb3d055a7074ef16 (diff) | |
download | cpython-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>
-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) |