Commit 613b4cf2 authored by Victor Stinner's avatar Victor Stinner

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.
parent edb9f873
...@@ -5,7 +5,6 @@ ...@@ -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 ...@@ -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')
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment