Skip to content

Commit c5ee241

Browse files
committed
Use pytest.approx for empty-text readability assertions (S1244)
1 parent 77f2041 commit c5ee241

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

test/unit_test/headless/test_readability_batch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def test_empty_text_is_zero():
4343
report = readability_report("")
4444
for key in ("flesch_reading_ease", "flesch_kincaid_grade", "gunning_fog",
4545
"smog_index", "automated_readability_index"):
46-
assert report[key] == 0.0
46+
assert report[key] == pytest.approx(0.0)
4747
assert report["stats"]["words"] == 0
4848

4949

0 commit comments

Comments
 (0)