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

This commit is contained in:
2025-08-05 16:46:41 +02:00
parent 5064fec461
commit 825b2b68ad
+2 -12
View File
@@ -26,26 +26,16 @@ 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(ioc.pvdb, **run_options)
asyncio.run(run(ioc.pvdb, startup_hook=None, interfaces=["127.0.0.1"]))
thread = threading.Thread(target=start_ioc, daemon=True)
thread.start()
time.sleep(2.0) # Give the IOC time to come 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):