feat(test): clean_baseline marker resets controller state before test
This commit is contained in:
@@ -653,6 +653,21 @@ def _check_live_gui_health(request, live_gui) -> Generator[None, None, None]:
|
||||
handle.ensure_alive()
|
||||
yield
|
||||
|
||||
@pytest.fixture(autouse=True)
|
||||
def _reset_clean_baseline(request, live_gui) -> Generator[None, None, None]:
|
||||
"""[SDM: tests/conftest.py:_reset_clean_baseline] [C: tests marked with @pytest.mark.clean_baseline]"""
|
||||
if request.node.get_closest_marker("clean_baseline"):
|
||||
try:
|
||||
from src.api_hook_client import ApiHookClient
|
||||
client = ApiHookClient()
|
||||
if client.wait_for_server(timeout=5):
|
||||
client.reset_session()
|
||||
time.sleep(0.2)
|
||||
except Exception:
|
||||
pass
|
||||
yield
|
||||
|
||||
|
||||
@pytest.fixture
|
||||
def live_gui_workspace(live_gui) -> Path:
|
||||
"""[SDM: tests/conftest.py:live_gui_workspace] [C: tests/test_rag_phase4_*.py, tests/test_saved_presets_sim.py, etc.]"""
|
||||
|
||||
Reference in New Issue
Block a user