Converted to unittest

This commit is contained in:
Onur Atakan ULUSOY 2022-05-11 16:44:48 +00:00
parent 6622d84a91
commit 34c2dbef17
2 changed files with 241 additions and 232 deletions

View File

@ -67,4 +67,4 @@ jobs:
- name: Test with pytest
run: |
cd tests
pytest /home/runner/work/deepface/tests/unit_tests.py
pytest unit_tests.py

View File

@ -9,10 +9,15 @@ from deepface import DeepFace
from deepface.commons import functions
import json
import time
import unittest
#-----------------------------------------
import tensorflow as tf
class deepface_unit_tests(unittest.TestCase):
def test_deepface(self):
tf_version = int(tf.__version__.split(".")[0])
if tf_version == 2:
@ -342,3 +347,7 @@ df = DeepFace.find(img1, db_path = "dataset")
print(df.head())
print("--------------------------")
self.assertEqual(accuracy >= min_score, False, "A problem on the deepface installation.")
unittest.main(exit=False)