Update tests/test_utils_pv.py
Run CI Tests / test (push) Successful in 1m0s

This commit is contained in:
2025-08-05 16:40:06 +02:00
parent dfb8b95616
commit 5064fec461
+11 -3
View File
@@ -26,18 +26,26 @@ def run_test_ioc():
prefix = "TEST:"
ioc = TestIOC(prefix=prefix)
# ✅ Force minimal args to avoid pytest conflicts
_, run_options = ioc_arg_parser(
default_prefix=prefix,
desc="Test IOC",
argv=["--list-pvs"] # important to avoid argparse clash
)
# ✅ Proper IOC launch with run_options
def start_ioc():
# Run the IOC directly, no parsing
asyncio.run(run(ioc.pvdb, startup_hook=None))
run(ioc.pvdb, **run_options)
thread = threading.Thread(target=start_ioc, daemon=True)
thread.start()
# Let the IOC boot up
# ✅ Wait for server to be up
time.sleep(1.5)
yield
# Fixture to capture stdout (for tqdm / progress bar)
@pytest.fixture
def capture_stdout(monkeypatch):