MCPcopy Create free account
hub / github.com/Vinyzu/recognizer / test_only_captcha

Function test_only_captcha

tests/test_detector.py:21–48  ·  view source on GitHub ↗
(detector: Detector)

Source from the content-addressed store, hash-verified

19
20
21def test_only_captcha(detector: Detector):
22 img_bytes = image_dir.joinpath("only_captcha.png").read_bytes()
23 response, coordinates = detector.detect("motorcycle", img_bytes, area_captcha=True)
24
25 # General Checks
26 assert response, coordinates
27 assert len(response) == 16
28
29 # Response Correctness
30 assert sum(response) == len(coordinates)
31 assert response == [
32 True,
33 True,
34 True,
35 False,
36 True,
37 True,
38 True,
39 False,
40 False,
41 True,
42 True,
43 False,
44 False,
45 False,
46 False,
47 False,
48 ]
49
50
51def test_area_yolo_captcha(detector: Detector):

Callers

nothing calls this directly

Calls 1

detectMethod · 0.80

Tested by

no test coverage detected