Skip to content

Commit

Permalink
test: update test script
Browse files Browse the repository at this point in the history
  • Loading branch information
StarHeartHunt committed Oct 22, 2022
1 parent 720a28d commit 21e563d
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/supervisors/test_reload.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
import logging
import signal
from pathlib import Path
import sys
from time import sleep
from typing import Optional, Type

Expand Down Expand Up @@ -392,7 +393,10 @@ def test_base_reloader_should_exit(tmp_path):
assert not reloader.should_exit.is_set()
reloader.pause()

reloader.signal_handler(signal.SIGINT, None)
if sys.platform == "win32":
reloader.signal_handler(signal.CTRL_C_EVENT, None)
else:
reloader.signal_handler(signal.SIGINT, None)

assert reloader.should_exit.is_set()
with pytest.raises(StopIteration):
Expand Down

0 comments on commit 21e563d

Please sign in to comment.