On Cygwin, skip tests using "forkserver" start method.
Don't check BrokenProcessPool.__cause__, it's not set on Cygwin.
self._test(ProcessPoolSpawnFailingInitializerTest)
@support.skip_if_sanitizer("TSAN doesn't support threads after fork", thread=True)
+ @unittest.skipIf(sys.platform == "cygwin",
+ "Forkserver is not available on Cygwin")
def test_forkserver(self):
self._test(ProcessPoolForkserverFailingInitializerTest)
with self.assertRaises(BrokenProcessPool) as bpe:
future.result()
- cause = bpe.exception.__cause__
- self.assertIsInstance(cause, futures.process._RemoteTraceback)
- self.assertIn(
- f"terminated abruptly with exit code {exit_code}", cause.tb
- )
+ if sys.platform != 'cygwin':
+ cause = bpe.exception.__cause__
+ self.assertIsInstance(cause, futures.process._RemoteTraceback)
+ self.assertIn(
+ f"terminated abruptly with exit code {exit_code}", cause.tb
+ )
@warnings_helper.ignore_fork_in_thread_deprecation_warnings()
@hashlib_helper.requires_hashdigest('md5')
_check_system_limits()
except NotImplementedError:
self.skipTest("ProcessPoolExecutor unavailable on this system")
- if sys.platform == "win32":
+ if sys.platform in ("win32", "cygwin"):
self.skipTest("require unix system")
if support.check_sanitizer(thread=True):
self.skipTest("TSAN doesn't support threads after fork")