1818# Test functions use test fixture signature names and access class privates
1919# pylint: disable=protected-access,redefined-outer-name, duplicate-code
2020
21+
2122@pytest .fixture
2223def single_circle () -> generate_detect_target_contour .InputImageAndTimeAndExpectedBoundingBoxes :
2324 """
@@ -102,14 +103,14 @@ def detector() -> detect_target_contour.DetectTargetContour: # type: ignore
102103
103104
104105def compare_detections (
105- actual_and_expected_detections : generate_detect_target_contour .InputImageAndTimeAndExpectedBoundingBoxes
106+ actual_and_expected_detections : generate_detect_target_contour .InputImageAndTimeAndExpectedBoundingBoxes ,
106107) -> None :
107108 """
108109 Compare expected and actual detections.
109-
110+
110111 actual_and_expected_detections: Test data containing both actual image and time and expected bounding boxes.
111112 """
112- actual = actual_and_expected_detections .image_and_time_data .detector
113+ actual = actual_and_expected_detections .image_and_time_data .detector
113114 expected = actual_and_expected_detections .bounding_box_list
114115
115116 assert len (actual ) == len (expected )
@@ -124,7 +125,7 @@ def compare_detections(
124125 for i , expected_detection in enumerate (expected ):
125126 actual_detection = sorted_actual_detections [i ]
126127
127- # Check label and confidence
128+ # Check label and confidence
128129 assert actual_detection .label == expected_detection [1 ]
129130 np .testing .assert_almost_equal (
130131 actual_detection .confidence ,
@@ -180,8 +181,7 @@ def test_single_circle(
180181
181182 # Create new object with actual detections
182183 test_data = generate_detect_target_contour .InputImageAndTimeAndExpectedBoundingBoxes (
183- actual ,
184- single_circle .bounding_box_list
184+ actual , single_circle .bounding_box_list
185185 )
186186 compare_detections (test_data )
187187
0 commit comments