Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 8f748e1

Browse files
story645QuLogic
andcommitted
Document visualizing_tests tool.
Co-authored-by: Elliott Sales de Andrade <[email protected]>
1 parent d267a1d commit 8f748e1

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

doc/devel/testing.rst

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,19 @@ not need to be installed, but Matplotlib should be)::
5959

6060
.. _command-line parameters: http://doc.pytest.org/en/latest/usage.html
6161

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 in an HTML page using the
67+
``visualize_tests`` tool::
68+
69+
python tools/visualize_tests.py
70+
71+
Image test failures can be analysed using the ``triage_tests`` tool::
72+
73+
python tools/triage_tests.py
74+
6275

6376
Writing a simple test
6477
---------------------
@@ -94,7 +107,9 @@ For numpy's default random number generator use::
94107

95108
and then use ``rng`` when generating the random numbers.
96109

97-
The seed is John Hunter's birthday.
110+
The seed is :ref:`John Hunter's <project_history>` birthday.
111+
112+
.. _image-comparison:
98113

99114
Writing an image comparison test
100115
--------------------------------
@@ -128,6 +143,10 @@ texts (labels, tick labels, etc) are not really part of what is tested, use
128143
``remove_text=True`` as this will lead to smaller figures and reduce possible
129144
issues with font mismatch on different platforms.
130145

146+
147+
Compare two methods of creating an image
148+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
149+
131150
Baseline images take a lot of space in the Matplotlib repository.
132151
An alternative approach for image comparison tests is to use the
133152
`~matplotlib.testing.decorators.check_figures_equal` decorator, which should be

0 commit comments

Comments
 (0)