Downloadable hash library in HTML summary #138
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Main task was creating the hash library file in the results directory and making it available to download in the sort/filter menu in the HTML summary. Fixed various other things:
HTML summary when generating
When generating baseline images, the generated images now appear in a requested HTML summary. (See the "Generating baseline images..." demos: https://macbride.me/pytest-mpl/.)
Documented behaviour when generating hashes
Documented the existing behaviour: when generating a hash library, the tests will also be run as usual against the existing hash library specified by
--mpl-hash-library
or the keyword argument. However, generating baseline images will always result in the tests being skipped.Make an updated hash library downloadable from HTML summary
When the
--mpl-results-always
option is active, and some hash comparison tests are performed, a hash library containing all the result hashes will also be saved to the root of the results directory. The filename will be extracted from--mpl-generate-hash-library
,--mpl-hash-library
orhash_library=
in that order.Made the generated hash library available to download in the sort/filter menu of the HTML summary. (See any demo involving hash generation or comparison: https://macbride.me/pytest-mpl/.)
Closes #135
Removed incorrect warning
Removed warning
Ignoring --mpl-result-path since --mpl-generate-path is set
because when generating, a HTML summary may be saved there.Added tests for the generating options
These test that the JSON summaries match for various combinations of hashes and/or images generating options. Generated hash libraries are verified against the baseline. (Although, generated images are not currently verified.) Any generated HTML summaries are available here: https://macbride.me/pytest-mpl/
Additional commits on 2022-02-19
image_status
andhash_status
to the JSON report so it's easier to determine the individual results in the HTML report. Statuses arematch
,diff
,missing
,generated
andNone
.