mirror of
https://github.com/serengil/deepface.git
synced 2025-06-07 03:55:21 +00:00
Converted to unittest
This commit is contained in:
parent
6622d84a91
commit
34c2dbef17
2
.github/workflows/tests.yml
vendored
2
.github/workflows/tests.yml
vendored
@ -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
|
@ -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)
|
Loading…
x
Reference in New Issue
Block a user