@@ -52,43 +52,40 @@ matplotlib source directory::
52
52
Running the tests
53
53
-----------------
54
54
55
- Running the tests is simple. Make sure you have nose installed and run
56
- the setup script's ``test `` command::
55
+ Running the tests is simple. Make sure you have nose installed and run::
57
56
58
- python setup .py test
57
+ python tests .py
59
58
60
59
in the root directory of the distribution. The script takes a set of
61
60
commands, such as:
62
61
63
62
======================== ===========
64
- ``--pep8-only `` pep8 checks
65
- ``--omit-pep8 `` Do not perform pep8 checks
66
- ``--nocapture `` do not capture stdout (nosetests)
67
- ``--nose-verbose `` be verbose (nosetests)
68
- ``--processes `` number of processes (nosetests)
69
- ``--process-timeout `` process timeout (nosetests)
70
- ``--with-coverage `` with coverage
71
- ``--detailed-error-msg `` detailed error message (nosetest)
72
- ``--tests `` comma separated selection of tests (nosetest)
63
+ ``--pep8 `` pep8 checks
64
+ ``--no-pep8 `` Do not perform pep8 checks
65
+ ``--no-network `` Disable tests that require network access
73
66
======================== ===========
74
67
75
- Additionally it is possible to run only coding standard test or disable them:
68
+ Additional arguments are passed on to nosetests. See the nose
69
+ doumentation for supported arguments. Some of the more important ones are given
70
+ here:
76
71
77
- =================== ===========
78
- ``--pep8 `` run only PEP8 checks
79
- ``--no-pep8 `` disable PEP8 checks
80
- =================== ===========
72
+ ============================= ===========
73
+ ``--verbose `` Be more verbose
74
+ ``--processes=NUM `` Run tests in parallel over NUM processes
75
+ ``--process-timeout=SECONDS `` Set timeout for results from test runner process
76
+ ``--nocapture `` Do not capture stdout
77
+ ============================= ===========
81
78
82
79
To run a single test from the command line, you can provide a
83
80
dot-separated path to the module followed by the function separated by
84
81
a colon, e.g., (this is assuming the test is installed)::
85
82
86
- python setup .py test --tests= matplotlib.tests.test_simplification:test_clipping
83
+ python tests .py matplotlib.tests.test_simplification:test_clipping
87
84
88
85
If you want to run the full test suite, but want to save wall time try
89
86
running the tests in parallel::
90
87
91
- python setup .py test --nocapture --nose-verbose --processes=5 --process-timeout=300
88
+ python tests .py --nocapture --nose-verbose --processes=5 --process-timeout=300
92
89
93
90
94
91
An alternative implementation that does not look at command line
@@ -100,9 +97,10 @@ matplotlib library function :func:`matplotlib.test`::
100
97
101
98
.. hint ::
102
99
103
- You might need to install nose for this ::
100
+ To run the tests you need to install nose and mock if using python 2.7 ::
104
101
105
102
pip install nose
103
+ pip install mock
106
104
107
105
108
106
.. _`nosetest arguments` : http://nose.readthedocs.org/en/latest/usage.html
0 commit comments