-
Notifications
You must be signed in to change notification settings - Fork 47
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
result_image redundancy #153
Comments
Actually, it looks like |
I suspect that it could be tidied up, feel free to go for it. I think it was @ConorMacBride who touched this section last? |
pytest-mpl/pytest_mpl/plugin.py Lines 445 to 447 in e387618
So technically the These three lines are duplicated because the plugin can do baseline image comparison, hash library comparison or both (hybrid mode). But to prevent saving twice, maybe they should be moved to a separate method which only saves if it doesn't already exist. |
In the
plugin.ImageComparison.compare_image_to_hash_library
method, duringhybrid-mode
, theresult_image
appears to be unnecessarily copied into thesummary
dictionary from the outcome ofplugin.ImageComparison.compare_image_to_baseline
:pytest-mpl/pytest_mpl/plugin.py
Lines 571 to 573 in e387618
i.e., the
summary['result_image']
has already been correctly set withinplugin.ImageComparison.compare_image_to_hash
:pytest-mpl/pytest_mpl/plugin.py
Lines 551 to 554 in e387618
If this is the case, are you happy for me to remove this behaviour?
The text was updated successfully, but these errors were encountered: