[Python-checkins] cpython: Issue #19946: appropriately skip new multiprocessing tests

nick.coghlan python-checkins at python.org
Thu Dec 19 12:54:34 CET 2013


http://hg.python.org/cpython/rev/460961e80e31
changeset:   88055:460961e80e31
user:        Nick Coghlan <ncoghlan at gmail.com>
date:        Thu Dec 19 21:53:31 2013 +1000
summary:
  Issue #19946: appropriately skip new multiprocessing tests

Thanks to Christian Heimes for noting the buildbot failures and
to Zachary Ware for providing the patch to make the new tests
play nice with both other platforms and unittest test discovery

files:
  Lib/test/test_multiprocessing_main_handling.py |  14 +++------
  1 files changed, 5 insertions(+), 9 deletions(-)


diff --git a/Lib/test/test_multiprocessing_main_handling.py b/Lib/test/test_multiprocessing_main_handling.py
--- a/Lib/test/test_multiprocessing_main_handling.py
+++ b/Lib/test/test_multiprocessing_main_handling.py
@@ -130,10 +130,9 @@
 class MultiProcessingCmdLineMixin():
     maxDiff = None # Show full tracebacks on subprocess failure
 
-    def setupClass(cls):
-        if cls.start_method not in _concrete_contexts:
-            raise unittest.SkipTest("%r start method not available" %
-                                                          cls.start_method)
+    def setUp(self):
+        if self.start_method not in _concrete_contexts:
+            self.skipTest("%r start method not available" % self.start_method)
 
     def _check_output(self, script_name, exit_code, out, err):
         if verbose > 1:
@@ -277,11 +276,8 @@
     start_method = 'forkserver'
     main_in_children_source = test_source_main_skipped_in_children
 
-def test_main():
-    support.run_unittest(SpawnCmdLineTest,
-                         ForkCmdLineTest,
-                         ForkServerCmdLineTest)
+def tearDownModule():
     support.reap_children()
 
 if __name__ == '__main__':
-    test_main()
+    unittest.main()

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list