Skip to content

Commit 474d8b6

Browse files
committed
Tests: approx the remaining float equality checks (Sonar S1244)
1 parent 850a8cc commit 474d8b6

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/unit_test/headless/test_analysis_batch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,13 +25,13 @@ def test_heal_stats_metrics():
2525
assert stats["by_method"] == {"image": 1, "vlm": 2}
2626
assert stats["fallbacks"] == 2
2727
assert stats["fallback_rate"] == pytest.approx(round(2 / 3, 4))
28-
assert stats["avg_duration_ms"] == 30.0
28+
assert stats["avg_duration_ms"] == pytest.approx(30.0)
2929
assert stats["top_brittle"][0] == {"locator": "btn.png", "fallbacks": 2}
3030

3131

3232
def test_heal_stats_empty():
3333
stats = heal_stats([])
34-
assert stats["total"] == 0 and stats["heal_rate"] == 0.0
34+
assert stats["total"] == 0 and stats["heal_rate"] == pytest.approx(0.0)
3535

3636

3737
# --- secrets scan ---------------------------------------------------------

0 commit comments

Comments
 (0)