Skip to content

Commit 82e787d

Browse files
committed
Fix test on Windows
1 parent 0e65c2b commit 82e787d

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

Lib/test/_test_multiprocessing.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5833,8 +5833,11 @@ def test_spawn_dont_set_context(self):
58335833
for method in ('fork', 'spawn', 'forkserver'):
58345834
multiprocessing.set_start_method(None, force=True)
58355835

5836-
context = multiprocessing.get_context(method)
5837-
process = context.Process(target=self._dummy_func)
5836+
try:
5837+
ctx = multiprocessing.get_context(method)
5838+
except ValueError:
5839+
continue
5840+
process = ctx .Process(target=self._dummy_func)
58385841
process.start()
58395842
process.join()
58405843
self.assertIsNone(multiprocessing.get_start_method(allow_none=True))

0 commit comments

Comments
 (0)