Commit 33d5fb86 authored by Nick Coghlan's avatar Nick Coghlan

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
parent ac201fed
...@@ -130,10 +130,9 @@ def _make_launch_script(script_dir, script_basename, module_name, path=None): ...@@ -130,10 +130,9 @@ def _make_launch_script(script_dir, script_basename, module_name, path=None):
class MultiProcessingCmdLineMixin(): class MultiProcessingCmdLineMixin():
maxDiff = None # Show full tracebacks on subprocess failure maxDiff = None # Show full tracebacks on subprocess failure
def setupClass(cls): def setUp(self):
if cls.start_method not in _concrete_contexts: if self.start_method not in _concrete_contexts:
raise unittest.SkipTest("%r start method not available" % self.skipTest("%r start method not available" % self.start_method)
cls.start_method)
def _check_output(self, script_name, exit_code, out, err): def _check_output(self, script_name, exit_code, out, err):
if verbose > 1: if verbose > 1:
...@@ -277,11 +276,8 @@ class ForkServerCmdLineTest(MultiProcessingCmdLineMixin, unittest.TestCase): ...@@ -277,11 +276,8 @@ class ForkServerCmdLineTest(MultiProcessingCmdLineMixin, unittest.TestCase):
start_method = 'forkserver' start_method = 'forkserver'
main_in_children_source = test_source_main_skipped_in_children main_in_children_source = test_source_main_skipped_in_children
def test_main(): def tearDownModule():
support.run_unittest(SpawnCmdLineTest,
ForkCmdLineTest,
ForkServerCmdLineTest)
support.reap_children() support.reap_children()
if __name__ == '__main__': if __name__ == '__main__':
test_main() unittest.main()
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