@@ -59,6 +59,23 @@ not need to be installed, but Matplotlib should be)::
59
59
60
60
.. _command-line parameters : http://doc.pytest.org/en/latest/usage.html
61
61
62
+ Viewing image test output
63
+ ^^^^^^^^^^^^^^^^^^^^^^^^^
64
+
65
+ The output of :ref: `image-based <image-comparison >` tests is stored in a
66
+ ``result_images `` directory. These images can be compiled into one HTML page, containing
67
+ hundreds of images, using the ``visualize_tests `` tool::
68
+
69
+ python tools/visualize_tests.py
70
+
71
+ Image test failures can also be analysed using the ``triage_tests `` tool::
72
+
73
+ python tools/triage_tests.py
74
+
75
+ The triage tool allows you to accept or reject test failures and will copy the new image
76
+ to the folder where the baseline test images are stored. The triage tool requires that
77
+ :ref: `QT <backend_dependencies >` is installed.
78
+
62
79
63
80
Writing a simple test
64
81
---------------------
@@ -94,7 +111,9 @@ For numpy's default random number generator use::
94
111
95
112
and then use ``rng `` when generating the random numbers.
96
113
97
- The seed is John Hunter's birthday.
114
+ The seed is :ref: `John Hunter's <project_history >` birthday.
115
+
116
+ .. _image-comparison :
98
117
99
118
Writing an image comparison test
100
119
--------------------------------
@@ -128,6 +147,10 @@ texts (labels, tick labels, etc) are not really part of what is tested, use
128
147
``remove_text=True `` as this will lead to smaller figures and reduce possible
129
148
issues with font mismatch on different platforms.
130
149
150
+
151
+ Compare two methods of creating an image
152
+ ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
153
+
131
154
Baseline images take a lot of space in the Matplotlib repository.
132
155
An alternative approach for image comparison tests is to use the
133
156
`~matplotlib.testing.decorators.check_figures_equal ` decorator, which should be
0 commit comments