AMMICO/ammico/test/test_faces.py
2023-05-02 12:59:51 +02:00

17 строки
454 B
Python

import ammico.faces as fc
import json
def test_analyse_faces(get_path):
mydict = {
"filename": get_path + "IMG_2746.png",
}
mydict.update(fc.EmotionDetector(mydict).analyse_image())
with open(get_path + "example_faces.json", "r") as file:
out_dict = json.load(file)
# delete the filename key
mydict.pop("filename", None)
for key in mydict.keys():
assert mydict[key] == out_dict[key]