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.
This commit is contained in:
Victor Stinner 2010-04-27 21:56:26 +00:00
parent edb9f873cf
commit 613b4cf283
1 changed files with 4 additions and 3 deletions

View File

@ -5,7 +5,6 @@
# #
import unittest import unittest
import threading
import Queue import Queue
import time import time
import sys import sys
@ -18,9 +17,11 @@ import random
import logging import logging
from test import test_support from test import test_support
from StringIO import StringIO from StringIO import StringIO
_multiprocessing = test_support.import_module('_multiprocessing') _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 # Work around broken sem_open implementations
test_support.import_module('multiprocessing.synchronize') test_support.import_module('multiprocessing.synchronize')