Skip to content

Commit 84b7ae3

Browse files
committed
Update to released p4p and epicscorelibs and add tests
1 parent 3b6dafb commit 84b7ae3

File tree

4 files changed

+160
-41
lines changed

4 files changed

+160
-41
lines changed

Pipfile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ pytest-flake8 = "*"
99
sphinx-rtd-theme = "*"
1010
setuptools-dso = "*"
1111
pytest-asyncio = "*"
12+
p4p = "*"
1213

1314
[packages]
1415
# All other package requirements from setup.py

Pipfile.lock

Lines changed: 151 additions & 41 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

tests/test_asyncio.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ async def test_asyncio_ioc(asyncio_ioc):
5454
assert await caget(PV_PREFIX + ":AI") == 12.34
5555
await asyncio.sleep(0.8)
5656
assert await caget(PV_PREFIX + ":AI") == 3.56
57+
# Check pvaccess works
58+
from p4p.client.asyncio import Context
59+
with Context("pva") as ctx:
60+
assert await ctx.get(PV_PREFIX + ":AI") == 3.56
5761
# Wait for a bit longer for the print output to flush
5862
await asyncio.sleep(2)
5963
# Stop

tests/test_cothread.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,10 @@ def test_cothread_ioc(cothread_ioc):
4646
assert caget(PV_PREFIX + ":STRINGOUT") == "watevah"
4747
caput(PV_PREFIX + ":STRINGOUT", "something", wait=True)
4848
assert caget(PV_PREFIX + ":STRINGOUT") == "something"
49+
# Check pvaccess works
50+
from p4p.client.cothread import Context
51+
with Context("pva") as ctx:
52+
assert ctx.get(PV_PREFIX + ":STRINGOUT") == "something"
4953
# Stop
5054
cothread_ioc.send_signal(signal.SIGINT)
5155
# Disconnect

0 commit comments

Comments
 (0)