diff options
author | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-03-31 11:11:51 +0300 |
---|---|---|
committer | Claudiu Popa <cpopa@cloudbasesolutions.com> | 2015-03-31 11:11:51 +0300 |
commit | 5d2fcbe697dd429e29cfed60d08984262d328155 (patch) | |
tree | 1cfd19ea7ec822a4d671c91ed0da5c3a1bb02a39 | |
parent | f99af2d7989a6a3cdf02bf176b2d7f14de80c9a3 (diff) | |
download | astroid-5d2fcbe697dd429e29cfed60d08984262d328155.tar.gz |
Run test_multiprocessing_manager only if multiprocessing is available.
-rw-r--r-- | astroid/tests/unittest_brain.py | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/astroid/tests/unittest_brain.py b/astroid/tests/unittest_brain.py index 540d8e6..ecabf1f 100644 --- a/astroid/tests/unittest_brain.py +++ b/astroid/tests/unittest_brain.py @@ -36,6 +36,12 @@ try: except ImportError: HAS_NOSE = False +try: + import multiprocessing # pylint: disable=unused-import + HAS_MULTIPROCESSING = True +except ImportError: + HAS_MULTIPROCESSING = False + class HashlibTest(unittest.TestCase): def test_hashlib(self): @@ -141,8 +147,10 @@ class NoseBrainTest(unittest.TestCase): class MultiprocessingBrainTest(unittest.TestCase): - @unittest.skipIf(os.name == 'java', - 'multiprocesing is not available on Jython') + @unittest.skipUnless(HAS_MULTIPROCESSING, + 'multiprocesing is required for this test, but ' + 'on some platforms it is missing ' + '(Jython for instance)') def test_multiprocessing_manager(self): # Test that we have the proper attributes # for a multiprocessing.managers.SyncManager |