Skip to content

Commit

Permalink
Fix pytest.approx() usage
Browse files Browse the repository at this point in the history
  • Loading branch information
kalekundert authored and Bachmann1234 committed Dec 17, 2021
1 parent 2ac8dc8 commit d5001ce
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion tests/test_report_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ def test_percent_covered(self):
# There are 6 lines that are both in the diff and measured,
# and 4 of those are covered.
for src_path in self.SRC_PATHS:
assert pytest.approx(self.report.percent_covered(src_path), 4.0 / 6 * 100)
assert self.report.percent_covered(src_path) == pytest.approx(4.0 / 6 * 100)

def test_violation_lines(self):
# By construction, each file has the same coverage information
Expand Down

0 comments on commit d5001ce

Please sign in to comment.