(detector: Detector)
| 58 | |
| 59 | |
| 60 | def test_one_path_input(detector: Detector): |
| 61 | img_bytes = image_dir.joinpath("full_page.png") |
| 62 | response, coordinates = detector.detect("bicycle", [str(img_bytes)], area_captcha=False) |
| 63 | print(f"Path: [full_page.png], Task: [Bicycle], Result: {response}; Coordinates: {coordinates}") |
| 64 | |
| 65 | # General Checks |
| 66 | assert response, coordinates |
| 67 | assert len(response) == 9 |
| 68 | |
| 69 | # Response Correctness |
| 70 | assert sum(response) == len(coordinates) |
| 71 | |
| 72 | |
| 73 | def test_paths_input(detector: Detector): |