diff --git a/tests/test_process.py b/tests/test_process.py index 773a62d2f..2e6850276 100644 --- a/tests/test_process.py +++ b/tests/test_process.py @@ -47,8 +47,8 @@ def check_image(root_folder, image, name, level=0.9): if False: cv2.imwrite(expected_name, image) return - if not os.path.isfile(expected_name): - cv2.imwrite(result_name, image) + if not os.path.exists(expected_name): + cv2.imwrite(expected_name, image) assert not os.path.isfile(expected_name), "Expected image not found: " + expected_name expected = cv2.imread(expected_name) assert expected is not None, "Wrong image: " + expected_name