diff options
author | Victor Stinner <victor.stinner@haypocalc.com> | 2010-04-27 21:56:26 (GMT) |
---|---|---|
committer | Victor Stinner <victor.stinner@haypocalc.com> | 2010-04-27 21:56:26 (GMT) |
commit | 613b4cf28337902a586f259c6144083771fc06e5 (patch) | |
tree | 155dc7f545aada32a5a737a1a67a1daa8a0b8049 | |
parent | edb9f873cfbf9d7f05cb73fa19036831813b28be (diff) | |
download | cpython-613b4cf28337902a586f259c6144083771fc06e5.zip cpython-613b4cf28337902a586f259c6144083771fc06e5.tar.gz cpython-613b4cf28337902a586f259c6144083771fc06e5.tar.bz2 |
Issue #7449, part 4: skip test_multiprocessing if thread support is disabled
import threading after _multiprocessing to raise a more revelant error message:
"No module named _multiprocessing". _multiprocessing is not compiled without
thread support.
-rw-r--r-- | Lib/test/test_multiprocessing.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py index 8f32cfb..03629d1 100644 --- a/Lib/test/test_multiprocessing.py +++ b/Lib/test/test_multiprocessing.py @@ -5,7 +5,6 @@ # import unittest -import threading import Queue import time import sys @@ -18,9 +17,11 @@ import random import logging from test import test_support from StringIO import StringIO - - _multiprocessing = test_support.import_module('_multiprocessing') +# import threading after _multiprocessing to raise a more revelant error +# message: "No module named _multiprocessing". _multiprocessing is not compiled +# without thread support. +import threading # Work around broken sem_open implementations test_support.import_module('multiprocessing.synchronize') |