Skip to content

Commit

Permalink
Do not test captcha recognition by default
Browse files Browse the repository at this point in the history
  • Loading branch information
Johannes Griss committed Jun 22, 2024
1 parent 81e6fc3 commit 6f62f7e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,5 @@ tests/credentials.json
dist
*.egg-info
__pycache__
NEW FEATURES.md
NEW FEATURES.md
build
6 changes: 6 additions & 0 deletions tests/test_onnx.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,12 @@

class TestInference(unittest.TestCase):
def test_inference(self):
# only run if set
run_tests = os.getenv("TEST_ONNX", False)

if not run_tests:
return

"""Test if the inference works on the test image"""
solver = Solver(os.path.join(currentdir, "../models/captcha_huawei.onnx"), device=["CPUExecutionProvider"])
result = solver.solve_captcha(cv2.imread(os.path.join(currentdir, "test_img.png")))
Expand Down

0 comments on commit 6f62f7e

Please sign in to comment.