AMMICO/misinformation/test/test_faces.py
Dominic Kempf f99d15cf40
Restrict the scope of facial expression recognition by thresholding likelihood (#38)
* Apply thresholding to restrict the scope of facial expression recognition

* fix test dict faces

* remove approx

* do not ignore data in subdirs

* where does test_display come from

* remove face analysis duplication

* imageai sneaked into ci

Co-authored-by: Inga Ulusoy <inga.ulusoy@uni-heidelberg.de>
2022-12-13 13:15:56 +01:00

17 строки
414 B
Python

import misinformation.faces as fc
import json
from pytest import approx
def test_analyse_faces():
mydict = {
"filename": "./test/data/IMG_2746.png",
}
mydict = fc.EmotionDetector(mydict).analyse_image()
with open("./test/data/example_faces.json", "r") as file:
out_dict = json.load(file)
for key in mydict.keys():
assert mydict[key] == out_dict[key]