@@ -121,6 +121,9 @@ async def test_start_stop_cluster(Cluster, engine_launcher_class):
121121 assert cluster ._engine_sets == {}
122122
123123
124+ @pytest .mark .skipif (
125+ sys .platform .startswith ("win" ), reason = "Signal tests don't pass on Windows yet"
126+ )
124127async def test_signal_engines (request , Cluster , engine_launcher_class ):
125128 cluster = Cluster (engine_launcher_class = engine_launcher_class )
126129 await cluster .start_controller ()
@@ -250,20 +253,22 @@ async def test_to_from_dict(Cluster, engine_launcher_class):
250253 es2 = next (iter (cluster2 ._engine_sets .values ()))
251254 # ensure responsive
252255 rc [:].apply_async (lambda : None ).get (timeout = _timeout )
253- # register signal handler
254- signals = rc [:].apply_async (_prepare_signal ).get (timeout = _timeout )
255- # get test signal from engines in case of cross-platform mismatch,
256- # e.g. SIGUSR1 on mac (30) -> linux (10)
257- test_signal = signals [0 ]
258- # submit request to be interrupted
259- ar = rc [:].apply_async (time .sleep , 3 )
260- await asyncio .sleep (0.5 )
261- # send signal
262- await cluster2 .signal_engines (test_signal )
263-
264- # wait for result, which should raise KeyboardInterrupt
265- with raises_remote (KeyboardInterrupt ) as e :
266- ar .get (timeout = _timeout )
256+ if not sys .platform .startswith ("win" ):
257+ # signal tests doesn't work yet on Windows
258+ # register signal handler
259+ signals = rc [:].apply_async (_prepare_signal ).get (timeout = _timeout )
260+ # get test signal from engines in case of cross-platform mismatch,
261+ # e.g. SIGUSR1 on mac (30) -> linux (10)
262+ test_signal = signals [0 ]
263+ # submit request to be interrupted
264+ ar = rc [:].apply_async (time .sleep , 3 )
265+ await asyncio .sleep (0.5 )
266+ # send signal
267+ await cluster2 .signal_engines (test_signal )
268+
269+ # wait for result, which should raise KeyboardInterrupt
270+ with raises_remote (KeyboardInterrupt ) as e :
271+ ar .get (timeout = _timeout )
267272 assert es1 .n == es2 .n
268273 assert cluster2 .engine_launcher_class is cluster .engine_launcher_class
269274
@@ -275,5 +280,6 @@ async def test_default_from_file(Cluster):
275280 cluster = Cluster (n = 1 , profile = "default" , cluster_id = "" )
276281 async with cluster :
277282 cluster2 = ipp .Cluster .from_file ()
283+ assert cluster2 .cluster_file == cluster .cluster_file
278284 with await cluster .connect_client () as rc :
279285 assert len (rc ) == 1
0 commit comments