@@ -84,19 +84,19 @@ The hash library can be generated with
8484``--mpl-generate-hash-library=path_to_file.json ``. The hash library to be used
8585can either be specified via the ``--mpl-hash-library= `` command line argument,
8686or via the ``hash_library= `` keyword argument to the
87- ``@pytest.mark.mpl_image_comapre `` decorator.
87+ ``@pytest.mark.mpl_image_compare `` decorator.
8888
8989
9090Hybrid Mode: Hashes and Images
9191^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
9292
9393It is possible to configure both hashes and baseline images. In this scenario
94- the hashes will be compared first, and the baseline images used if the hash
94+ the hashes will be compared first, with the baseline images only used if the hash
9595comparison fails.
9696
9797This is especially useful if the baseline images are external to the repository
98- with the tests in , and can be accessed remotely . In this situation if the hashes
99- match the baseline images wont be retrieved, saving time and bandwidth. Also it
98+ containing the tests, and are accessed via HTTP . In this situation, if the hashes
99+ match, the baseline images won't be retrieved, saving time and bandwidth. Also, it
100100allows the tests to be modified and the hashes updated to reflect the changes
101101without having to modify the external images.
102102
@@ -111,16 +111,16 @@ against, the tests can be run with::
111111
112112and the tests will pass if the images are the same. If you omit the
113113``--mpl `` option, the tests will run but will only check that the code
114- runs without checking the output images.
114+ runs, without checking the output images.
115115
116116
117117Generating a Failure Summary
118118^^^^^^^^^^^^^^^^^^^^^^^^^^^^
119119
120- By specifying the ``--mpl-generate-summary=html `` CLI argument a HTML summary
120+ By specifying the ``--mpl-generate-summary=html `` CLI argument, a HTML summary
121121page will be generated showing the baseline, diff and result image for each
122122failing test. If no baseline images are configured, just the result images will
123- be displayed.
123+ be displayed. (See also, the ** Results always ** section below.)
124124
125125Options
126126-------
@@ -182,6 +182,24 @@ are run. In addition, if both this option and the ``baseline_dir``
182182option in the ``mpl_image_compare `` decorator are used, the one in the
183183decorator takes precedence.
184184
185+ Results always
186+ ^^^^^^^^^^^^^^
187+
188+ By default, result images are only generated for tests that fail.
189+ Passing ``--mpl-results-always `` to pytest will force result images
190+ to be generated for all tests, even for tests that pass.
191+ If a baseline image exists, a diff image will also be generated.
192+ All of these images will be shown in the summary (if requested).
193+
194+ This option is useful for always *comparing * the result images again
195+ the baseline images, while only *assessing * the tests against the
196+ hash library.
197+ If you only update your baseline images after merging a PR, this
198+ option means that the generated summary will always show how the
199+ PR affects the baseline images, with the success status of each
200+ test (based on the hash library) also shown in the generated
201+ summary.
202+
185203Base style
186204^^^^^^^^^^
187205
0 commit comments