Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitafc6749

Browse files
story645QuLogic
andcommitted
Document visualizing_tests tool.
Co-authored-by: Elliott Sales de Andrade <quantum.analyst@gmail.com>
1 parentd267a1d commitafc6749

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

‎doc/devel/testing.rst

Lines changed: 16 additions & 1 deletion
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
---------------------
@@ -94,7 +103,9 @@ For numpy's default random number generator use::
94103

95104
and then use ``rng`` when generating the random numbers.
96105

97-
The seed is John Hunter's birthday.
106+
The seed is:ref:`John Hunter's<project_history>` birthday.
107+
108+
.. _image-comparison:
98109

99110
Writing an image comparison test
100111
--------------------------------
@@ -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)

[8]ページ先頭

©2009-2025 Movatter.jp