feat(02-04): decorate 7 test files with @pytest.mark.ac markers

- test_acceptance.py: 8 decorators (AC-1.1, AC-2.1a, AC-3.3, AC-3.4, AC-4.1, AC-4.4, AC-1.4)
- test_accuracy.py: 11 decorators (AC-1.1, AC-1.2, AC-1.3, AC-2.1a, AC-2.2, AC-4.1)
- test_processor_pipe.py: 2 decorators (AC-4.4, AC-1.4)
- test_gps_input_encoding.py: module-level pytestmark for AC-4.3 (13 tests)
- test_sitl_integration.py: 9 decorators (AC-4.3, AC-4.4, AC-NEW-2, AC-5.2, AC-3.4)
- test_mavlink.py: 5 decorators (AC-4.3, AC-5.2, AC-3.4)
- test_schemas.py: 2 class-level decorators (AC-6.3, AC-6.3)
- 14 non-deferred ACs covered; 45 tests collected under -m ac
This commit is contained in:
Yuzviak
2026-05-11 18:25:52 +03:00
parent 4bf6f67d0c
commit 6a1cd513a7
7 changed files with 39 additions and 1 deletions
+9
View File
@@ -90,6 +90,7 @@ def _wait_for_tcp(host: str, port: int, timeout: float = 30.0) -> bool:
# SITL-01: Connection
# ---------------------------------------------------------------------------
@pytest.mark.ac("AC-4.3")
def test_sitl_tcp_port_reachable():
"""SITL-01: ArduPilot SITL TCP port is reachable before running tests."""
reachable = _wait_for_tcp(SITL_HOST, SITL_PORT, timeout=30.0)
@@ -99,6 +100,7 @@ def test_sitl_tcp_port_reachable():
)
@pytest.mark.ac("AC-4.3")
def test_pymavlink_connection_to_sitl():
"""SITL-01: pymavlink connects to SITL without error."""
pytest.importorskip("pymavlink", reason="pymavlink not installed")
@@ -115,6 +117,8 @@ def test_pymavlink_connection_to_sitl():
# SITL-02: GPS_INPUT accepted by SITL EKF
# ---------------------------------------------------------------------------
@pytest.mark.ac("AC-4.3")
@pytest.mark.ac("AC-NEW-2")
def test_gps_input_accepted_by_sitl():
"""SITL-02: Sending GPS_INPUT produces GPS_RAW_INT with fix_type >= 3."""
pytest.importorskip("pymavlink", reason="pymavlink not installed")
@@ -173,6 +177,7 @@ def test_gps_input_accepted_by_sitl():
# SITL-03: MAVLinkBridge lifecycle
# ---------------------------------------------------------------------------
@pytest.mark.ac("AC-4.3")
@pytest.mark.asyncio
async def test_mavlink_bridge_start_stop_with_sitl():
"""SITL-03: MAVLinkBridge.start/stop with real SITL TCP connection."""
@@ -228,6 +233,8 @@ async def test_imu_callback_fires_from_sitl():
# SITL-05: GPS_INPUT rate ≥ 5 Hz
# ---------------------------------------------------------------------------
@pytest.mark.ac("AC-4.3")
@pytest.mark.ac("AC-4.4")
@pytest.mark.asyncio
async def test_gps_input_rate_at_least_5hz():
"""SITL-05: MAVLinkBridge delivers GPS_INPUT at ≥5 Hz over 1 second."""
@@ -297,6 +304,8 @@ async def test_telemetry_reaches_sitl_at_1hz():
# SITL-07: Reloc request after 3 consecutive failures
# ---------------------------------------------------------------------------
@pytest.mark.ac("AC-5.2")
@pytest.mark.ac("AC-3.4")
@pytest.mark.asyncio
async def test_reloc_request_after_3_failures_with_sitl():
"""SITL-07: After 3 FAILED-confidence updates, reloc callback fires."""