b83c07443d
Module docstring + skipif gate on CODE_PATH_AUDIT_LIVE_GUI=1. The 2 live_gui tests go in Phase 11.
24 lines
895 B
Python
24 lines
895 B
Python
"""Live_gui E2E tests for src.code_path_audit v2 (opt-in).
|
|
|
|
These tests are gated on the CODE_PATH_AUDIT_LIVE_GUI env var.
|
|
Set CODE_PATH_AUDIT_LIVE_GUI=1 to enable. The tests use the
|
|
session-scoped live_gui fixture from tests/conftest.py to spin
|
|
up the full app with --enable-test-hooks on port 8999, then
|
|
invoke the code_path_audit_v2 MCP tool via ApiHookClient.
|
|
|
|
Per the live_gui test authoring contract (see
|
|
docs/guide_testing.md#authoring-robust-live_gui-tests-dont-assume-clean-state),
|
|
the tests use poll-until-state-visible rather than time.sleep,
|
|
because the v2 audit's MCP tool may run async via
|
|
_pending_gui_tasks dispatch.
|
|
"""
|
|
from __future__ import annotations
|
|
import os
|
|
|
|
import pytest
|
|
|
|
LIVE_GUI_ENABLED = os.environ.get("CODE_PATH_AUDIT_LIVE_GUI") == "1"
|
|
pytestmark = pytest.mark.skipif(
|
|
not LIVE_GUI_ENABLED,
|
|
reason="live_gui E2E test; set CODE_PATH_AUDIT_LIVE_GUI=1 to enable",
|
|
) |