Skip to content

Commit

Permalink
CI/tests: use .assertAlmostEqual() for tags count (ivre#1665)
Browse files Browse the repository at this point in the history
  • Loading branch information
p-l- authored Oct 11, 2024
1 parent 19f4493 commit b5ae3d9
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion tests/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -5257,7 +5257,12 @@ def test_50_view(self):

# Tags
self.check_value(
"view_count_tags", ivre.db.db.view.count(ivre.db.db.view.searchtag())
"view_count_tags",
ivre.db.db.view.count(ivre.db.db.view.searchtag()),
# This value changes a bit, depending on current data files => assertAlmostEqual
check=lambda first, second: self.assertAlmostEqual(
first, second, places=-1
),
)
self.check_value(
"view_count_tags_honeypot",
Expand Down

0 comments on commit b5ae3d9

Please sign in to comment.