From 8952e6b3057d8d817a7875e9d364ad9322e5ca7e Mon Sep 17 00:00:00 2001 From: Sefik Ilkin Serengil Date: Fri, 10 Feb 2023 13:45:10 +0000 Subject: [PATCH] Unexpected exception thrown --- tests/unit_tests.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/unit_tests.py b/tests/unit_tests.py index 8ef078b..dc97561 100644 --- a/tests/unit_tests.py +++ b/tests/unit_tests.py @@ -95,7 +95,8 @@ def test_cases(): assert "h" in objs[0]["facial_area"].keys() assert isinstance(objs[0]["embedding"], list) assert len(objs[0]["embedding"]) == 2622 # embedding of VGG-Face - except: + except Exception as err: + print(f"Unexpected exception thrown: {str(err)}") exception_thrown = True assert exception_thrown is False @@ -116,7 +117,8 @@ def test_cases(): obj = DeepFace.verify(img1_path=black_img, img2_path=black_img, enforce_detection=False) assert isinstance(obj, dict) exception_thrown = False - except: + except Exception as err: + print(f"Unexpected exception thrown: {str(err)}") exception_thrown = True assert exception_thrown is False