https://github.com/python/cpython/commit/1035fe0cfbeee23f61aed3332ebbae854e5da800
commit: 1035fe0cfbeee23f61aed3332ebbae854e5da800
branch: main
author: Nice Zombies <[email protected]>
committer: vstinner <[email protected]>
date: 2024-06-18T15:22:24Z
summary:

gh-117953: Skip `test_interpreters` properly without GIL (#120689)

files:
M Lib/test/test_interpreters/__init__.py

diff --git a/Lib/test/test_interpreters/__init__.py 
b/Lib/test/test_interpreters/__init__.py
index 52ff553f60d0d7..e3d189c4efcd27 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)

_______________________________________________
Python-checkins mailing list -- [email protected]
To unsubscribe send an email to [email protected]
https://mail.python.org/mailman3/lists/python-checkins.python.org/
Member address: [email protected]

Reply via email to