Skip to content

Commit 019a113

Browse files
committed
Adapt testing guide
1 parent 21a548e commit 019a113

File tree

1 file changed

+18
-20
lines changed

1 file changed

+18
-20
lines changed

doc/devel/testing.rst

Lines changed: 18 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -52,43 +52,40 @@ matplotlib source directory::
5252
Running the tests
5353
-----------------
5454

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::
5756

58-
python setup.py test
57+
python tests.py
5958

6059
in the root directory of the distribution. The script takes a set of
6160
commands, such as:
6261

6362
======================== ===========
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
7366
======================== ===========
7467

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:
7671

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+
============================= ===========
8178

8279
To run a single test from the command line, you can provide a
8380
dot-separated path to the module followed by the function separated by
8481
a colon, e.g., (this is assuming the test is installed)::
8582

86-
python setup.py test --tests=matplotlib.tests.test_simplification:test_clipping
83+
python tests.py matplotlib.tests.test_simplification:test_clipping
8784

8885
If you want to run the full test suite, but want to save wall time try
8986
running the tests in parallel::
9087

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
9289

9390

9491
An alternative implementation that does not look at command line
@@ -100,9 +97,10 @@ matplotlib library function :func:`matplotlib.test`::
10097

10198
.. hint::
10299

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::
104101

105102
pip install nose
103+
pip install mock
106104

107105

108106
.. _`nosetest arguments`: http://nose.readthedocs.org/en/latest/usage.html

0 commit comments

Comments
 (0)