(detector: Detector)
| 8 | |
| 9 | |
| 10 | def test_single_pathlib_input(detector: Detector): |
| 11 | img_bytes = image_dir.joinpath("full_page.png") |
| 12 | response, coordinates = detector.detect("bicycle", img_bytes, area_captcha=False) |
| 13 | print(f"Path: [full_page.png], Task: [Bicycle], Result: {response}; Coordinates: {coordinates}") |
| 14 | |
| 15 | # General Checks |
| 16 | assert response, coordinates |
| 17 | assert len(response) == 9 |
| 18 | |
| 19 | # Response Correctness |
| 20 | assert sum(response) == len(coordinates) |
| 21 | |
| 22 | |
| 23 | def test_one_pathlib_input(detector: Detector): |