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

This commit is contained in:
2025-08-07 21:54:25 +02:00
parent bbd0707855
commit b054f42b73
+9 -1
View File
@@ -42,7 +42,6 @@ def configure_logzero_for_pytest(caplog):
logger.propagate = True # Propager vers le root logger capturé par caplog
caplog.set_level(level = logging.DEBUG)
configure_logzero_for_pytest()
def is_pv_in_cache(name):
return any(k[0] == name for k in epics.pv._PVcache_)
@@ -77,6 +76,9 @@ def test_file_age(tmp_path, age_seconds, expected):
# preload()
def test_preload_fichier_valide(tmp_path, caplog):
configure_logzero_for_pytest(caplog)
f = tmp_path / "valide.pkl"
pvname_1 = "TEST:PV1"
pvname_2 = "TEST:PV2"
@@ -112,6 +114,9 @@ def test_preload_fichier_valide(tmp_path, caplog):
def test_preload_old_file(tmp_path, caplog):
configure_logzero_for_pytest(caplog)
f = tmp_path / "too_old.pkl"
pvname = "TEST:PV_X"
@@ -139,6 +144,9 @@ def test_preload_old_file(tmp_path, caplog):
# offload()
def test_offload(tmp_path, caplog):
configure_logzero_for_pytest(caplog)
fake_file = tmp_path / "offload_test.pkl"
pvname_3 = "TEST:PV3"
pvname_4 = "TEST:PV4"