Skip to content

Commit cfb9f64

Browse files
gh-154272: Skip more forkserver tests if the start method is unavailable (GH-154499)
Two tests were still not skipped: they were only guarded against Cygwin and Windows. Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com> (cherry picked from commit a2a8466)
1 parent 553e3b0 commit cfb9f64

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

Lib/test/test_concurrent_futures/test_init.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
import contextlib
22
import logging
3+
import multiprocessing
34
import queue
45
import time
56
import unittest
@@ -140,6 +141,8 @@ def test_spawn(self):
140141
self._test(ProcessPoolSpawnFailingInitializerTest)
141142

142143
@support.skip_if_sanitizer("TSAN doesn't support threads after fork", thread=True)
144+
@unittest.skipUnless("forkserver" in multiprocessing.get_all_start_methods(),
145+
"forkserver start method is not available")
143146
def test_forkserver(self):
144147
self._test(ProcessPoolForkserverFailingInitializerTest)
145148

0 commit comments

Comments
 (0)