]> granicus.if.org Git - python/commitdiff
Simplify run_tests.py (#3482)
authorAntoine Pitrou <pitrou@free.fr>
Sun, 10 Sep 2017 18:32:13 +0000 (20:32 +0200)
committerGitHub <noreply@github.com>
Sun, 10 Sep 2017 18:32:13 +0000 (20:32 +0200)
Tools/scripts/run_tests.py

index 30283023b6d3d36a957ae7af662d6ae5c42b7b10..9fc3799768362f8c423050cc176edbe3bcfbe6b9 100644 (file)
@@ -10,10 +10,6 @@ simply passing a -u option to this script.
 import os
 import sys
 import test.support
-try:
-    import threading
-except ImportError:
-    threading = None
 
 
 def is_multiprocess_flag(arg):
@@ -43,7 +39,7 @@ def main(regrtest_args):
                  ])
     if sys.platform == 'win32':
         args.append('-n')         # Silence alerts under Windows
-    if threading and not any(is_multiprocess_flag(arg) for arg in regrtest_args):
+    if not any(is_multiprocess_flag(arg) for arg in regrtest_args):
         args.extend(['-j', '0'])  # Use all CPU cores
     if not any(is_resource_use_flag(arg) for arg in regrtest_args):
         args.extend(['-u', 'all,-largefile,-audio,-gui'])