diff --git a/Lib/test/test_interpreters/__init__.py b/Lib/test/test_interpreters/__init__.py index e3d189c4efcd27..4b16ecc31156a5 100644 --- a/Lib/test/test_interpreters/__init__.py +++ b/Lib/test/test_interpreters/__init__.py @@ -1,9 +1,5 @@ import os -from test.support import load_package_tests, Py_GIL_DISABLED -import unittest - -if Py_GIL_DISABLED: - raise unittest.SkipTest("GIL disabled") +from test.support import load_package_tests def load_tests(*args): return load_package_tests(os.path.dirname(__file__), *args) diff --git a/Lib/test/test_interpreters/test_channels.py b/Lib/test/test_interpreters/test_channels.py index 52827357078b85..a87bc3a14dc462 100644 --- a/Lib/test/test_interpreters/test_channels.py +++ b/Lib/test/test_interpreters/test_channels.py @@ -5,7 +5,7 @@ import unittest import time -from test.support import import_helper +from test.support import import_helper, Py_GIL_DISABLED # Raise SkipTest if subinterpreters not supported. _channels = import_helper.import_module('_interpchannels') from concurrent import interpreters @@ -13,6 +13,9 @@ from .utils import _run_output, TestBase +if Py_GIL_DISABLED: + raise unittest.SkipTest("channels aren't completely thread-safe") + class LowLevelTests(TestBase): # The behaviors in the low-level module is important in as much