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)