Unexpected exception thrown

This commit is contained in:
Sefik Ilkin Serengil 2023-02-10 13:45:10 +00:00 committed by GitHub
parent 067e8f8c19
commit 8952e6b305
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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