Skip to content

Commit 655f799

Browse files
committed
Use pytest.approx for SLO float assertions
1 parent d52b463 commit 655f799

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

test/unit_test/headless/test_slo_batch.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,8 +28,8 @@ def test_all_good_zero_burn():
2828

2929
def test_empty_is_full_budget():
3030
report = evaluate_slo([], 0.99, now=1)
31-
assert report["sli"] == 1.0
32-
assert report["budget_remaining_fraction"] == 1.0
31+
assert report["sli"] == pytest.approx(1.0)
32+
assert report["budget_remaining_fraction"] == pytest.approx(1.0)
3333

3434

3535
def test_bad_target_raises():

0 commit comments

Comments
 (0)