Description:
Two test files have been testing the wrong things for a while and nobody caught it.
In test_blurring_operators.py, three tests are broken. The even-kernel tests for GaussianBlur and MedianBlur expect the operators to silently correct an even size to the next odd — that used to be the behaviour but both operators now just raise a ValueError instead. Same story with test_kernel_size_1_is_identity for MedianBlur, it passes kernelSize=1 but the validator rejects anything below 3. All three need to be rewritten to assert the error gets raised.
In test_contour_detection.py the parametrized test is passing color, retrieval_mode, and approximation_method as param keys but the operator actually reads rgbcolors_input, mode, and method. The wrong keys just get silently ignored so the tests were never actually hitting those code paths — they were passing for the wrong reason. One case also uses "LIST" as a mode value which doesn't exist in _MODE_MAP. On top of that the shape assertions in test_contour_detection_supports_gray_bgr_bgra are wrong — grayscale input comes out as BGR (H, W, 3) not (H, W), and BGRA comes out as BGRA (H, W, 4) not (H, W, 3).
Description:
Two test files have been testing the wrong things for a while and nobody caught it.
In
test_blurring_operators.py, three tests are broken. The even-kernel tests forGaussianBlurandMedianBlurexpect the operators to silently correct an even size to the next odd — that used to be the behaviour but both operators now just raise aValueErrorinstead. Same story withtest_kernel_size_1_is_identityforMedianBlur, it passeskernelSize=1but the validator rejects anything below 3. All three need to be rewritten to assert the error gets raised.In
test_contour_detection.pythe parametrized test is passingcolor,retrieval_mode, andapproximation_methodas param keys but the operator actually readsrgbcolors_input,mode, andmethod. The wrong keys just get silently ignored so the tests were never actually hitting those code paths — they were passing for the wrong reason. One case also uses"LIST"as a mode value which doesn't exist in_MODE_MAP. On top of that the shape assertions intest_contour_detection_supports_gray_bgr_bgraare wrong — grayscale input comes out as BGR(H, W, 3)not(H, W), and BGRA comes out as BGRA(H, W, 4)not(H, W, 3).