Update tests/test_utils_pvpreload.py
Run CI Tests / test (push) Successful in 1m9s

This commit is contained in:
2025-08-07 23:18:57 +02:00
parent 98f0e1c50f
commit b9dcc93ea6
+10 -2
View File
@@ -12,6 +12,7 @@ from datetime import datetime, timedelta
from slic.utils.hastyepics import get_pv
from epics.pv import _PVcache_
from slic.utils.pv import PV
import epics
import sys
@@ -174,8 +175,15 @@ def test_offload(tmp_path, caplog):
pvname_4 = "TEST:PV4"
# Create 2 PVs
get_pv(pvname_3)
get_pv(pvname_4)
pv_3 = PV(pvname_3, connection_timeout=2.0)
get_pv(pv_3)
assert pv_3.wait_for_connection(timeout=2.0), "PV not connected"
pv_4 = PV(pvname_4, connection_timeout=2.0)
get_pv(pv_4)
assert pv_4.wait_for_connection(timeout=2.0), "PV not connected"
print(epics.pv._PVcache_.values())
assert is_pv_in_cache(pvname_3)
assert is_pv_in_cache(pvname_4)