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

Skip to content

Commit 3cbe23f

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

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

doc/devel/testing.rst

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@ 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+
6271

6372
Writing a simple test
6473
---------------------
@@ -96,6 +105,8 @@ and then use ``rng`` when generating the random numbers.
96105

97106
The seed is John Hunter's birthday.
98107

108+
.. _image-comparison:
109+
99110
Writing an image comparison test
100111
--------------------------------
101112

@@ -128,6 +139,10 @@ texts (labels, tick labels, etc) are not really part of what is tested, use
128139
``remove_text=True`` as this will lead to smaller figures and reduce possible
129140
issues with font mismatch on different platforms.
130141

142+
143+
Compare two methods of creating an image
144+
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
145+
131146
Baseline images take a lot of space in the Matplotlib repository.
132147
An alternative approach for image comparison tests is to use the
133148
`~matplotlib.testing.decorators.check_figures_equal` decorator, which should be

0 commit comments

Comments
 (0)