Skip to content

Add skip_hash=True/False option to allow hash comparison to be skipped for specific tests#260

Open
astrofrog wants to merge 4 commits intomatplotlib:mainfrom
astrofrog:skip-hash
Open

Add skip_hash=True/False option to allow hash comparison to be skipped for specific tests#260
astrofrog wants to merge 4 commits intomatplotlib:mainfrom
astrofrog:skip-hash

Conversation

@astrofrog
Copy link
Collaborator

I am using pytest-mpl in glue-jupyter for non-matplotlib output (as described/discussed in #201) and I am using hybrid hash/baseline mode. Most of the tests give deterministic hashes, but a couple don't, and it's does not seem possible to fix this. However, the produced figures have an rms difference of <1 so very close to the baseline image.

This PR provides a way to skip hash comparison for specific tests when the hash library is enabled globally. If this is not desirable, I can try and find another solution, but I thought this might be generically useful for other projects.

Full disclaimer: I used a LLM to assist me as part of this PR, but every line here has been either written or reviewed/carefully checked by me

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.

1 participant