Skip to content

Commit 10b661a

Browse files
committed
Docs
1 parent 41cd651 commit 10b661a

File tree

1 file changed

+24
-1
lines changed

1 file changed

+24
-1
lines changed

README.rst

Lines changed: 24 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ If the directory does not exist, it will be created. The directory will
7171
be interpreted as being relative to where you are running ``pytest``.
7272
Once you are happy with the generated images, you should move them to a
7373
sub-directory called ``baseline`` relative to the test files (this name
74-
is configurable, see below). You can also generate the baseline images
74+
is configurable, see below). You can also generate the baseline image
7575
directly in the right directory.
7676

7777
With a Hash Library
@@ -89,6 +89,20 @@ or via the ``hash_library=`` keyword argument to the
8989
``@pytest.mark.mpl_image_comapre`` decorator.
9090

9191

92+
Hybrid Mode: Hashes and Images
93+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
94+
95+
It is possible to configure both hashes and baseline images. In this scenario
96+
the hashes will be compared first, and the baseline images used if the hash
97+
comparison fails.
98+
99+
This is especially useful if the baseline images are external to the repository
100+
with the tests in, and can be accessed remotely. In this situation if the hashes
101+
match the baseline images wont be retrieved, saving time and bandwidth. Also it
102+
allows the tests to be modified and the hashes updated to reflect the changes
103+
without having to modify the external images.
104+
105+
92106
Running Tests
93107
^^^^^^^^^^^^^
94108

@@ -101,6 +115,15 @@ and the tests will pass if the images are the same. If you omit the
101115
``--mpl`` option, the tests will run but will only check that the code
102116
runs without checking the output images.
103117

118+
119+
Generating a Failure Summary
120+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
121+
122+
By specifying the ``--mpl-generate-summary=html`` CLI argument a HTML summary
123+
page will be generated showing the baseline, diff and result image for each
124+
failing test. If no baseline images are configured, just the result images will
125+
be displayed.
126+
104127
Options
105128
-------
106129

0 commit comments

Comments
 (0)