@@ -12,9 +12,10 @@ infrastructure are in :mod:`matplotlib.testing`.
12
12
.. _Ghostscript : https://www.ghostscript.com/
13
13
.. _Inkscape : https://inkscape.org
14
14
.. _pytest-cov : https://pytest-cov.readthedocs.io/en/latest/
15
- .. _pytest-pep8 : https://pypi.python.org/pypi/pytest-pep8
16
- .. _pytest-xdist : https://pypi.python.org/pypi/pytest-xdist
17
- .. _pytest-timeout : https://pypi.python.org/pypi/pytest-timeout
15
+ .. _pytest-flake8 : https://pypi.org/project/pytest-flake8/
16
+ .. _pytest-xdist : https://pypi.org/project/pytest-xdist/
17
+ .. _pytest-timeout : https://pypi.org/project/pytest-timeout/
18
+ .. _flake8 : https://pypi.org/project/flake8/
18
19
19
20
Requirements
20
21
------------
@@ -32,7 +33,7 @@ The following software is required to run the tests:
32
33
Optionally you can install:
33
34
34
35
- pytest-cov _ (>=2.3.1) to collect coverage information
35
- - pytest-pep8 _ to test coding standards
36
+ - pytest-flake8 _ to test coding standards using flake8 _
36
37
- pytest-timeout _ to limit runtime in case of stuck tests
37
38
- pytest-xdist _ to run tests in parallel
38
39
@@ -44,28 +45,20 @@ Running the tests is simple. Make sure you have pytest installed and run::
44
45
45
46
pytest
46
47
47
- or::
48
+ in the root directory of the repository.
48
49
49
- pytest .
50
-
51
-
52
- in the root directory of the distribution. The script takes a set of
53
- commands, such as:
54
-
55
- ======================== ===========
56
- ``--pep8 `` Perform pep8 checks (requires pytest-pep8 _)
57
- ======================== ===========
58
-
59
- Additional arguments are passed on to pytest. See the pytest documentation for
60
- `supported arguments `_. Some of the more important ones are given here:
50
+ `pytest ` can be configured via a lot of `commandline parameters `_. Some
51
+ particularly useful ones are:
61
52
62
53
============================= ===========
63
- ``--verbose `` Be more verbose
64
- ``-- n NUM `` Run tests in parallel over NUM
54
+ ``-v `` or `` --verbose `` Be more verbose
55
+ ``-n NUM `` Run tests in parallel over NUM
65
56
processes (requires pytest-xdist _)
66
57
``--timeout=SECONDS `` Set timeout for results from each test
67
58
process (requires pytest-timeout _)
68
59
``--capture=no `` or ``-s `` Do not capture stdout
60
+ ``--flake8 `` Check coding standards using flake8 _
61
+ (requires pytest-flake8 _)
69
62
============================= ===========
70
63
71
64
To run a single test from the command line, you can provide a file path,
@@ -97,7 +90,7 @@ function :func:`matplotlib.test`::
97
90
matplotlib.test()
98
91
99
92
100
- .. _ supported arguments : http://doc.pytest.org/en/latest/usage.html
93
+ .. _ commandline parameters : http://doc.pytest.org/en/latest/usage.html
101
94
102
95
103
96
Writing a simple test
0 commit comments