davidbyttow / govips

A lightning fast image processing and resizing library for Go
MIT License
1.23k stars 196 forks source link

Imrove golden image tests #414

Open toaster opened 5 months ago

toaster commented 5 months ago

This PR contains some improvements which I made when working on a fuzzy image test. It does not affect any logic or test outcome.

But it changes the test behaviour: missing golden images now let the tests fail. Thus, they are detected by CI runs.

coveralls commented 5 months ago

Coverage Status

coverage: 73.322%. remained the same when pulling bdf57ba29697fb1acfab20ddc488d7cf38108e3a on toaster:imrove_golden_image_tests into 7f3b5942661cff89a71935dfcc271c4c86cd7d32 on davidbyttow:master.

tonimelisma commented 5 months ago

Hey, I think you're right that slowing down the testing is not really worth it for the fuzzy matchin. I'm not sure if you realized but not having existing reference images causes creation of them so with this PR it would be impossible to create new reference images.

Thanks for the thoughtfulness but I don't think we want to venture down this path with the test automation.

toaster commented 5 months ago

[…] so with this PR it would be impossible to create new reference images.

That’s not correct, the missing golden images are still being created.

toaster commented 5 months ago

@tonimelisma I would kindly ask you to reconsider your decision. This PR makes the missing golden images more visible by failing the tests and therefore the CI run but it still creates the missing golden images.