Skip to content
This repository has been archived by the owner on Feb 7, 2025. It is now read-only.

Commit

Permalink
Changed error message
Browse files Browse the repository at this point in the history
  • Loading branch information
Levi-Lesches committed Nov 26, 2024
1 parent 96dfba6 commit 4a08350
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions bin/analyze.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,14 @@ def main():
analyzer = ImageAnalyzer()

no_mallet = cv2.imread("no_mallet.jpg")
assert analyzer.has_mallet(no_mallet) == False, "Found mallet when there is no mallet"
if analyzer.has_mallet(no_mallet):
print("Error: Found mallet when there is no mallet")
return

yes_mallet = cv2.imread("yes_Mallet.jpg")
assert analyzer.has_mallet(yes_mallet) == True, "Could not detect mallet"
if not analyzer.has_mallet(yes_mallet):
print("Error: Could not detect mallet")
return


main()

0 comments on commit 4a08350

Please sign in to comment.