8000 gh-117953: Skip `test_interpreters` properly without GIL (#120689) · picnixz/cpython@145a126 · GitHub
[go: up one dir, main page]

Skip to content

Commit 145a126

Browse files
nineteendopicnixz
authored andcommitted
pythongh-117953: Skip test_interpreters properly without GIL (python#120689)
1 parent a1a1686 commit 145a126

File tree

1 file changed

+6
-3
lines changed

1 file changed

+6
-3
lines changed
Lines changed: 6 additions & 3 deletions
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)
0