@@ -20,6 +20,10 @@ infrastructure are in :mod:`matplotlib.testing`.
20
20
Requirements
21
21
------------
22
22
23
+ Install the latest version of Matplotlib as documented in
24
+ :ref: `installing_for_devs ` In particular, follow the instructions to use a
25
+ local FreeType build
26
+
23
27
The following software is required to run the tests:
24
28
25
29
- pytest _, version 3.0.0 or later
@@ -35,26 +39,6 @@ Optionally you can install:
35
39
- pytest-xdist _ to run tests in parallel
36
40
37
41
38
- Building matplotlib for image comparison tests
39
- ----------------------------------------------
40
-
41
- matplotlib's test suite makes heavy use of image comparison tests,
42
- meaning the result of a plot is compared against a known good result.
43
- Unfortunately, different versions of FreeType produce differently
44
- formed characters, causing these image comparisons to fail. To make
45
- them reproducible, matplotlib can be built with a special local copy
46
- of FreeType. This is recommended for all matplotlib developers.
47
-
48
- Add the following content to a ``setup.cfg `` file at the root of the
49
- matplotlib source directory::
50
-
51
- [test]
52
- local_freetype = True
53
- tests = True
54
-
55
- or by setting the ``MPLLOCALFREETYPE `` environmental variable to any true
56
- value.
57
-
58
42
Running the tests
59
43
-----------------
60
44
@@ -164,8 +148,7 @@ Writing an image based test is only slightly more difficult than a
164
148
simple test. The main consideration is that you must specify the
165
149
"baseline", or expected, images in the
166
150
:func: `~matplotlib.testing.decorators.image_comparison ` decorator. For
167
- example, this test generates a single image and automatically tests
168
- it::
151
+ example, this test generates a single image and automatically tests it::
169
152
170
153
import numpy as np
171
154
import matplotlib
@@ -262,13 +245,13 @@ repository <https://github.com/matplotlib/matplotlib/>`_ -- for
262
245
example, see `its Travis page
263
246
<https://travis-ci.org/matplotlib/matplotlib> `_.
264
247
265
- If you want to enable Travis CI for your personal matplotlib GitHub
248
+ If you want to enable Travis CI for your personal Matplotlib GitHub
266
249
repo, simply enable the repo to use Travis CI in either the Travis CI
267
250
UI or the GitHub UI (Admin | Service Hooks). For details, see `the
268
251
Travis CI Getting Started page
269
252
<https://docs.travis-ci.com/user/getting-started/> `_. This
270
253
generally isn't necessary, since any pull request submitted against
271
- the main matplotlib repository will be tested.
254
+ the main Matplotlib repository will be tested.
272
255
273
256
Once this is configured, you can see the Travis CI results at
274
257
https://travis-ci.org/your_GitHub_user_name/matplotlib -- here's `an
0 commit comments