diff --git a/tests/test_utils_pv.py b/tests/test_utils_pv.py index 3a52a85d2..fb1a79ef7 100644 --- a/tests/test_utils_pv.py +++ b/tests/test_utils_pv.py @@ -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):