This commit is contained in:
+11
-3
@@ -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):
|
||||
|
||||
Reference in New Issue
Block a user