Add assertion to verify length of analyzed objects.

As mentioned:
https://github.com/serengil/deepface/pull/1396#discussion_r1900012703
This commit is contained in:
h-alice 2025-01-03 11:01:12 +08:00
parent b69dcfcca7
commit 0f65a8765e
No known key found for this signature in database
GPG Key ID: 5708F34144A70909

View File

@ -142,6 +142,7 @@ def test_analyze_for_multiple_faces():
img = cv2.imread(img)
img = cv2.hconcat([img, img])
demography_objs = DeepFace.analyze(img, silent=True)
assert len(demography_objs) == 2
for demography in demography_objs:
logger.debug(demography)
assert demography["age"] > 20 and demography["age"] < 40