diff options
author | Antoine Pitrou <solipsis@pitrou.net> | 2010-11-22 16:26:21 (GMT) |
---|---|---|
committer | Antoine Pitrou <solipsis@pitrou.net> | 2010-11-22 16:26:21 (GMT) |
commit | 7744e2ae5e232634c1751bcacaeb0317459be00b (patch) | |
tree | e040a463cd665040ecc626a9457773ebe58aa030 /Lib/test/test_multiprocessing.py | |
parent | 0662bc297ae4cc8ba77de57b64c9999bc1f1c132 (diff) | |
download | cpython-7744e2ae5e232634c1751bcacaeb0317459be00b.zip cpython-7744e2ae5e232634c1751bcacaeb0317459be00b.tar.gz cpython-7744e2ae5e232634c1751bcacaeb0317459be00b.tar.bz2 |
Fix test_multiprocessing when ctypes isn't available
Diffstat (limited to 'Lib/test/test_multiprocessing.py')
-rw-r--r-- | Lib/test/test_multiprocessing.py | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py index ba565c4..465a831 100644 --- a/Lib/test/test_multiprocessing.py +++ b/Lib/test/test_multiprocessing.py @@ -815,8 +815,6 @@ class _TestEvent(BaseTestCase): # # -@unittest.skipUnless(HAS_SHAREDCTYPES, - "requires multiprocessing.sharedctypes") class _TestValue(BaseTestCase): ALLOWED_TYPES = ('processes',) @@ -828,6 +826,10 @@ class _TestValue(BaseTestCase): ('c', latin('x'), latin('y')) ] + def setUp(self): + if not HAS_SHAREDCTYPES: + self.skipTest("requires multiprocessing.sharedctypes") + @classmethod def _test(cls, values): for sv, cv in zip(values, cls.codes_values): @@ -1662,12 +1664,14 @@ class _Foo(Structure): ('y', c_double) ] -@unittest.skipUnless(HAS_SHAREDCTYPES, - "requires multiprocessing.sharedctypes") class _TestSharedCTypes(BaseTestCase): ALLOWED_TYPES = ('processes',) + def setUp(self): + if not HAS_SHAREDCTYPES: + self.skipTest("requires multiprocessing.sharedctypes") + @classmethod def _double(cls, x, y, foo, arr, string): x.value *= 2 |