Skip to content

Commit 8b868eb

Browse files
committed
Make tests work on windows
1 parent df90f39 commit 8b868eb

File tree

2 files changed

+4
-3
lines changed

2 files changed

+4
-3
lines changed

tests/sim_asyncio_ioc_override.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424

2525
# Override DTYPE and OUT, and provide a callback
2626
gain = builder.boolOut("GAIN", on_update=print)
27+
softioc.devIocStats(parsed_args.prefix)
2728

2829
# Run the IOC
2930
builder.LoadDatabase()

tests/test_asyncio.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,12 @@
11
# Will be ignored on Python2 by conftest.py settings
22

3-
import signal
43
import pytest
54

65

76
@pytest.mark.asyncio
87
async def test_asyncio_ioc(asyncio_ioc):
98
import asyncio
10-
from aioca import caget, caput, camonitor, CANothing, _catools, FORMAT_TIME
9+
from aioca import caget, caput, camonitor, CANothing, FORMAT_TIME
1110

1211
# Start
1312
pre = asyncio_ioc.pv_prefix
@@ -68,7 +67,7 @@ async def test_asyncio_ioc_override(asyncio_ioc_override):
6867
assert (await caget(pre + ":GAIN")) == 1
6968

7069
# Stop
71-
asyncio_ioc_override.proc.send_signal(signal.SIGINT)
70+
await caput(pre + ":SYSRESET", 1)
7271
# check closed and output
7372
out, err = asyncio_ioc_override.proc.communicate()
7473
out = out.decode()
@@ -77,3 +76,4 @@ async def test_asyncio_ioc_override(asyncio_ioc_override):
7776
assert '1' in out
7877
assert 'Starting iocInit' in err
7978
assert 'iocRun: All initialization complete' in err
79+
assert 'IOC reboot started' in err

0 commit comments

Comments
 (0)