Skip to content

Commit 996cfb8

Browse files
committed
Make tests work on windows
1 parent df90f39 commit 996cfb8

1 file changed

Lines changed: 6 additions & 1 deletion

File tree

tests/test_asyncio.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
import signal
44
import pytest
5+
import sys
56

67

78
@pytest.mark.asyncio
@@ -68,7 +69,11 @@ async def test_asyncio_ioc_override(asyncio_ioc_override):
6869
assert (await caget(pre + ":GAIN")) == 1
6970

7071
# Stop
71-
asyncio_ioc_override.proc.send_signal(signal.SIGINT)
72+
if sys.platform == "win32":
73+
sig = signal.CTRL_C_EVENT
74+
else:
75+
sig = signal.SIGINT
76+
asyncio_ioc_override.proc.send_signal(sig)
7277
# check closed and output
7378
out, err = asyncio_ioc_override.proc.communicate()
7479
out = out.decode()

0 commit comments

Comments
 (0)