Skip to content

Commit

Permalink
test_detect_faces: sort array for determinism (#135)
Browse files Browse the repository at this point in the history
Signed-off-by: Stephan Lachnit <[email protected]>
  • Loading branch information
stephanlachnit authored Jan 16, 2024
1 parent 6c72dc5 commit 60d9ed3
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 60d9ed3

Please sign in to comment.