summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_multiprocessing_main_handling.py
diff options
context:
space:
mode:
authorTerry Jan Reedy <tjreedy@udel.edu>2014-06-13 18:23:43 (GMT)
committerTerry Jan Reedy <tjreedy@udel.edu>2014-06-13 18:23:43 (GMT)
commitbc7c96b9ea64f4af3cb342725ebdff2abe6058ea (patch)
tree9a8b44e468f548e36c82c44e361e20cc7350edd2 /Lib/test/test_multiprocessing_main_handling.py
parentee0e5104b8675e5b1d7ce0c469d2598d880f0bc2 (diff)
downloadcpython-bc7c96b9ea64f4af3cb342725ebdff2abe6058ea.zip
cpython-bc7c96b9ea64f4af3cb342725ebdff2abe6058ea.tar.gz
cpython-bc7c96b9ea64f4af3cb342725ebdff2abe6058ea.tar.bz2
Issue #20043: Add direct test for _thread.
Diffstat (limited to 'Lib/test/test_multiprocessing_main_handling.py')
-rw-r--r--Lib/test/test_multiprocessing_main_handling.py7
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_multiprocessing_main_handling.py b/Lib/test/test_multiprocessing_main_handling.py
index 7ea8e78..bfd6737 100644
--- a/Lib/test/test_multiprocessing_main_handling.py
+++ b/Lib/test/test_multiprocessing_main_handling.py
@@ -1,4 +1,8 @@
# tests __main__ module handling in multiprocessing
+from test import support
+# Skip tests if _thread or _multiprocessing wasn't built.
+support.import_module('_thread')
+support.import_module('_multiprocessing')
import importlib
import importlib.machinery
@@ -9,14 +13,11 @@ import os
import os.path
import py_compile
-from test import support
from test.script_helper import (
make_pkg, make_script, make_zip_pkg, make_zip_script,
assert_python_ok, assert_python_failure, temp_dir,
spawn_python, kill_python)
-# Skip tests if _multiprocessing wasn't built.
-_multiprocessing = support.import_module('_multiprocessing')
# Look up which start methods are available to test
import multiprocessing
AVAILABLE_START_METHODS = set(multiprocessing.get_all_start_methods())