Commit 7744e2ae authored by Antoine Pitrou's avatar Antoine Pitrou

Fix test_multiprocessing when ctypes isn't available

parent 0662bc29
......@@ -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
......
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