Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix reference images for pillow 9.4 #84

Merged
merged 7 commits into from
Jan 9, 2023

Conversation

mraspaud
Copy link
Member

@mraspaud mraspaud commented Jan 9, 2023

This PR should fix some reference images for compatibility with pillow 9.4

@mraspaud mraspaud requested a review from djhoese January 9, 2023 15:17
@mraspaud mraspaud self-assigned this Jan 9, 2023
Copy link
Member

@djhoese djhoese left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Darn it, I was going to do this. I was going to make a new compare_or_recreate_image function that recreated the test images if they didn't already exist (fail the test on recreation).

Anyway, I guess this looks good. Could/should the areas that you refactored out be fixtures? I guess it doesn't matter.

@mraspaud
Copy link
Member Author

mraspaud commented Jan 9, 2023

Darn it, I was going to do this. I was going to make a new compare_or_recreate_image function that recreated the test images if they didn't already exist (fail the test on recreation).

Yes, I tried this also, but I wanted this to be an option to pytest, but I couldn't find an elegant solution to have the file being saved on failure... Next time maybe.

Anyway, I guess this looks good. Could/should the areas that you refactored out be fixtures? I guess it doesn't matter.

I think they don't need to be. My hope is that by exposing those at the beginning of the file will promote the use of existing areas instead of creating new ones every time.

@djhoese
Copy link
Member

djhoese commented Jan 9, 2023

Yes, I tried this also, but I wanted this to be an option to pytest, but I couldn't find an elegant solution to have the file being saved on failure... Next time maybe.

I thought it would require the developer to delete the failing images, rerun tests which generate the images but still fail, then rerun the tests which should now pass.

@djhoese
Copy link
Member

djhoese commented Jan 9, 2023

My commit message is wrong, but the change is correct. I switched Python 3.7 to Python 3.8 in CI. Should I maybe bump 3.9 to 3.11?

@coveralls
Copy link

coveralls commented Jan 9, 2023

Coverage Status

Coverage: 95.07% (+0.08%) from 94.993% when pulling 3506178 on mraspaud:fix_pil_rounding into 7038731 on pytroll:main.

@djhoese djhoese merged commit 1e530ff into pytroll:main Jan 9, 2023
@mraspaud mraspaud deleted the fix_pil_rounding branch January 10, 2023 07:13
@mraspaud mraspaud mentioned this pull request Jan 10, 2023
5 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Test failure with Pillow 9.4
3 participants