Skip to content

Commit

Permalink
test_detect_faces: sort array for determinism
Browse files Browse the repository at this point in the history
Closes #134

Signed-off-by: Stephan Lachnit <stephanlachnit@debian.org>
  • Loading branch information
stephanlachnit committed Oct 26, 2023
1 parent 9eff9bb commit 166242c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion tests/test_opencv.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,4 +71,5 @@ def test_detect_faces(self):
self.assertIsInstance(faces, list)
# There are two faces in the image
self.assertEqual(len(faces), 2)
assert_allclose(faces, self.expected_faces, atol=2)
# Sort out list as there is no preferred order of the faces
assert_allclose(sorted(faces), sorted(self.expected_faces), atol=2)

0 comments on commit 166242c

Please sign in to comment.