From 60d9ed3a87e5634950debb3c16b9fa5992486082 Mon Sep 17 00:00:00 2001 From: Stephan Lachnit Date: Tue, 16 Jan 2024 23:30:22 +0100 Subject: [PATCH] test_detect_faces: sort array for determinism (#135) Signed-off-by: Stephan Lachnit --- tests/test_opencv.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tests/test_opencv.py b/tests/test_opencv.py index 917749ad..cfa6e271 100644 --- a/tests/test_opencv.py +++ b/tests/test_opencv.py @@ -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)