diff options
| author | Martin Panter <vadmium+py@gmail.com> | 2016-10-20 21:45:49 (GMT) |
|---|---|---|
| committer | Martin Panter <vadmium+py@gmail.com> | 2016-10-20 21:45:49 (GMT) |
| commit | 56b2cf5e8564c7221a42675d35aaa0d0c503365e (patch) | |
| tree | dcae273036ff24ca0a35c20da821bf3ffb7c55e5 /Lib/test/test_regrtest.py | |
| parent | 10f29c903751f80c3f53be433dcbbba6f1382048 (diff) | |
| download | cpython-56b2cf5e8564c7221a42675d35aaa0d0c503365e.zip cpython-56b2cf5e8564c7221a42675d35aaa0d0c503365e.tar.gz cpython-56b2cf5e8564c7221a42675d35aaa0d0c503365e.tar.bz2 | |
Issue #28484: Skip tests if GIL is not used or multithreading is disabled
Diffstat (limited to 'Lib/test/test_regrtest.py')
| -rw-r--r-- | Lib/test/test_regrtest.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/Lib/test/test_regrtest.py b/Lib/test/test_regrtest.py index d431604..52909d8 100644 --- a/Lib/test/test_regrtest.py +++ b/Lib/test/test_regrtest.py @@ -696,7 +696,12 @@ class ArgsTestCase(BaseTestCase): code = TEST_INTERRUPTED test = self.create_test("sigint", code=code) - for multiprocessing in (False, True): + try: + import threading + tests = (False, True) + except ImportError: + tests = (False,) + for multiprocessing in tests: if multiprocessing: args = ("--slowest", "-j2", test) else: |
