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