Merged revisions 86694 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r86694 | antoine.pitrou | 2010-11-22 17:26:21 +0100 (lun., 22 nov. 2010) | 3 lines Fix test_multiprocessing when ctypes isn't available ........
This commit is contained in:
parent
7157d33929
commit
72d5a9d192
|
@ -812,8 +812,6 @@ class _TestEvent(BaseTestCase):
|
||||||
#
|
#
|
||||||
#
|
#
|
||||||
|
|
||||||
@unittest.skipUnless(HAS_SHAREDCTYPES,
|
|
||||||
"requires multiprocessing.sharedctypes")
|
|
||||||
class _TestValue(BaseTestCase):
|
class _TestValue(BaseTestCase):
|
||||||
|
|
||||||
ALLOWED_TYPES = ('processes',)
|
ALLOWED_TYPES = ('processes',)
|
||||||
|
@ -825,6 +823,10 @@ class _TestValue(BaseTestCase):
|
||||||
('c', latin('x'), latin('y'))
|
('c', latin('x'), latin('y'))
|
||||||
]
|
]
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
if not HAS_SHAREDCTYPES:
|
||||||
|
self.skipTest("requires multiprocessing.sharedctypes")
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _test(cls, values):
|
def _test(cls, values):
|
||||||
for sv, cv in zip(values, cls.codes_values):
|
for sv, cv in zip(values, cls.codes_values):
|
||||||
|
@ -1580,12 +1582,14 @@ class _Foo(Structure):
|
||||||
('y', c_double)
|
('y', c_double)
|
||||||
]
|
]
|
||||||
|
|
||||||
@unittest.skipUnless(HAS_SHAREDCTYPES,
|
|
||||||
"requires multiprocessing.sharedctypes")
|
|
||||||
class _TestSharedCTypes(BaseTestCase):
|
class _TestSharedCTypes(BaseTestCase):
|
||||||
|
|
||||||
ALLOWED_TYPES = ('processes',)
|
ALLOWED_TYPES = ('processes',)
|
||||||
|
|
||||||
|
def setUp(self):
|
||||||
|
if not HAS_SHAREDCTYPES:
|
||||||
|
self.skipTest("requires multiprocessing.sharedctypes")
|
||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def _double(cls, x, y, foo, arr, string):
|
def _double(cls, x, y, foo, arr, string):
|
||||||
x.value *= 2
|
x.value *= 2
|
||||||
|
|
Loading…
Reference in New Issue