Skip to content

Commit 69c6157

Browse files
nineteendoestyxx
authored andcommitted
pythongh-117953: Skip test_interpreters properly without GIL (python#120689)
1 parent 042bf76 commit 69c6157

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
+6-3
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
import os
22
from test.support import load_package_tests, Py_GIL_DISABLED
3+
import unittest
34

4-
if not Py_GIL_DISABLED:
5-
def load_tests(*args):
6-
return load_package_tests(os.path.dirname(__file__), *args)
5+
if Py_GIL_DISABLED:
6+
raise unittest.SkipTest("GIL disabled")
7+
8+
def load_tests(*args):
9+
return load_package_tests(os.path.dirname(__file__), *args)

0 commit comments

Comments
 (0)