Update tests/test_utils_hastepics.py
Run CI Tests / test (push) Failing after 1m58s

This commit is contained in:
2025-08-11 21:20:05 +02:00
parent 98a9981c12
commit 76266e88d8
+5 -8
View File
@@ -148,15 +148,12 @@ def test_motor_val_connect_via_cache():
def test_speedup_get_pv():
"""Ton get_pv délègue à epics.get_pv : on vérifie juste qu'il n'est pas nettement plus lent."""
N = 10
t0 = time.perf_counter()
for _ in range(N):
get_pv("TEST:SIM:M13.VAL", connect=False)
get_pv("TEST:SIM:M13.VAL", connect=False)
t1 = time.perf_counter()
t2 = time.perf_counter()
for _ in range(N):
epics.get_pv("TEST:SIM:M13.VAL", connect=True)
epics.get_pv("TEST:SIM:M13.VAL", connect=True)
t3 = time.perf_counter()
fast_time = t1 - t0
@@ -185,9 +182,9 @@ def test_speedup_motor_instantiation():
def test_speedup_motor_PV():
# baseline EPICS
m_epics = epics.Motor("TEST:SIM:M14")
m_slow = Motor("TEST:SIM:M14")
t0 = time.perf_counter()
pv_epics = m_epics.PV("VAL", connect=True, timeout=2.0)
pv_slow = m_slow.PV("VAL", connect=True, timeout=2.0)
t1 = time.perf_counter()
m_fast = Motor("TEST:SIM:M15")
@@ -195,7 +192,7 @@ def test_speedup_motor_PV():
pv_fast = m_fast.PV("VAL", connect=False)
t3 = time.perf_counter()
assert pv_epics.connected
assert pv_slow.connected
assert not pv_fast.connected
slow_time = t1 - t0