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
+10
View File
@@ -162,6 +162,7 @@ def test_benchmark_summary_non_empty():
# AC-PERF-3: Latency < 400ms
# ---------------------------------------------------------------
@pytest.mark.ac("AC-4.1")
def test_per_frame_latency_under_400ms():
"""AC-PERF-3: p95 per-frame latency < 400ms on synthetic trajectory."""
result = _run_benchmark(num_frames=20)
@@ -182,6 +183,7 @@ def test_median_error_with_sat_corrections():
)
@pytest.mark.ac("AC-1.1")
def test_pct_within_50m_with_sat_corrections():
"""AC-PERF-1: ≥80% frames within 50m when satellite corrections are active."""
result = _run_benchmark(num_frames=40, with_sat=True)
@@ -191,6 +193,7 @@ def test_pct_within_50m_with_sat_corrections():
)
@pytest.mark.ac("AC-1.2")
def test_pct_within_20m_with_sat_corrections():
"""AC-PERF-2: ≥60% frames within 20m when satellite corrections are active."""
result = _run_benchmark(num_frames=40, with_sat=True)
@@ -239,6 +242,7 @@ def test_waypoint_steering_changes_direction():
# AC-PERF-4: VO drift over 1 km straight segment
# ---------------------------------------------------------------
@pytest.mark.ac("AC-1.3")
def test_vo_drift_under_100m_over_1km():
"""AC-PERF-4: VO drift (no sat correction) over 1 km < 100 m."""
bench = AccuracyBenchmark()
@@ -252,6 +256,7 @@ def test_vo_drift_under_100m_over_1km():
# AC-PERF-6: Covariance shrinks after satellite update
# ---------------------------------------------------------------
@pytest.mark.ac("AC-2.2")
def test_covariance_shrinks_after_satellite_update():
"""AC-PERF-6: ESKF position covariance trace decreases after satellite correction."""
from gps_denied.core.eskf import ESKF
@@ -274,6 +279,7 @@ def test_covariance_shrinks_after_satellite_update():
# AC-PERF-5: Confidence tier transitions
# ---------------------------------------------------------------
@pytest.mark.ac("AC-2.1a")
def test_confidence_high_after_fresh_satellite():
"""AC-PERF-5: HIGH confidence when satellite correction is recent + covariance small."""
from gps_denied.core.eskf import ESKF
@@ -323,6 +329,8 @@ def test_confidence_failed_after_3_consecutive():
# passes_acceptance_criteria integration
# ---------------------------------------------------------------
@pytest.mark.ac("AC-1.1")
@pytest.mark.ac("AC-1.2")
def test_passes_acceptance_criteria_full_pass():
"""passes_acceptance_criteria returns (True, all-True) for ideal data."""
result = BenchmarkResult(
@@ -336,6 +344,7 @@ def test_passes_acceptance_criteria_full_pass():
assert all(checks.values())
@pytest.mark.ac("AC-4.1")
def test_passes_acceptance_criteria_latency_fail():
"""passes_acceptance_criteria fails when latency exceeds 400ms."""
result = BenchmarkResult(
@@ -349,6 +358,7 @@ def test_passes_acceptance_criteria_latency_fail():
assert checks["AC-PERF-3: p95 latency < 400ms"] is False
@pytest.mark.ac("AC-1.1")
def test_passes_acceptance_criteria_accuracy_fail():
"""passes_acceptance_criteria fails when less than 80% within 50m."""
result = BenchmarkResult(