From 120f1ec3f23bfb4477ec1ff0c932fe9fdfb3ae2a Mon Sep 17 00:00:00 2001
From: Yannick DAYER <yannick.dayer@idiap.ch>
Date: Fri, 9 Jul 2021 13:45:57 +0200
Subject: [PATCH] Accelerate the replaymobile-img tests

---
 bob/bio/face/test/test_databases.py | 21 +++++++++------------
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/bob/bio/face/test/test_databases.py b/bob/bio/face/test/test_databases.py
index b213e68c..59d10423 100644
--- a/bob/bio/face/test/test_databases.py
+++ b/bob/bio/face/test/test_databases.py
@@ -276,10 +276,7 @@ def test_replaymobile():
     database = bob.bio.base.load_resource(
         "replaymobile-img", "database", preferred_package="bob.bio.face"
     )
-    samples = database.all_samples(groups=("dev", "eval"))
-    assert len(samples) == 1557600, len(samples)
-    sample = samples[0]
-    del samples
+    sample = database.probes()[0][0]
     assert hasattr(sample, "annotations")
     assert "reye" in sample.annotations
     assert "leye" in sample.annotations
@@ -292,16 +289,16 @@ def test_replaymobile():
     # Only if data is available
     if rc.get("bob.db.replaymobile.directory", None):
         assert sample.annotations == {
-            "bottomright": [785, 395],
-            "topleft": [475, 167],
-            "leye": [587, 336],
-            "reye": [588, 238],
-            "mouthleft": [705, 252],
-            "mouthright": [706, 326],
-            "nose": [643, 295],
+            "bottomright": [734, 407],
+            "topleft": [436, 182],
+            "leye": [541, 350],
+            "reye": [540, 245],
+            "mouthleft": [655, 254],
+            "mouthright": [657, 338],
+            "nose": [591, 299],
         }
         assert sample.data.shape == (3, 1280, 720)
-        assert sample.data[0, 0, 0] == 87
+        assert sample.data[0, 0, 0] == 110
 
 
 @pytest.mark.skipif(
-- 
GitLab