[Python-checkins] r86696 - in python/branches/release27-maint: Lib/test/test_multiprocessing.py

antoine.pitrou python-checkins at python.org
Mon Nov 22 17:35:57 CET 2010


Author: antoine.pitrou
Date: Mon Nov 22 17:35:57 2010
New Revision: 86696

Log:
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
........


Modified:
   python/branches/release27-maint/   (props changed)
   python/branches/release27-maint/Lib/test/test_multiprocessing.py

Modified: python/branches/release27-maint/Lib/test/test_multiprocessing.py
==============================================================================
--- python/branches/release27-maint/Lib/test/test_multiprocessing.py	(original)
+++ python/branches/release27-maint/Lib/test/test_multiprocessing.py	Mon Nov 22 17:35:57 2010
@@ -812,8 +812,6 @@
 #
 #
 
- at unittest.skipUnless(HAS_SHAREDCTYPES,
-                     "requires multiprocessing.sharedctypes")
 class _TestValue(BaseTestCase):
 
     ALLOWED_TYPES = ('processes',)
@@ -825,6 +823,10 @@
         ('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):
@@ -1614,12 +1616,14 @@
         ('y', c_double)
         ]
 
- at 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


More information about the Python-checkins mailing list