Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4877ad2

Browse files
committed
Update testing documentation
1 parent 8bb973b commit 4877ad2

File tree

1 file changed

+30
-17
lines changed

1 file changed

+30
-17
lines changed

doc/devel/testing.rst

Lines changed: 30 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,40 +31,53 @@ the setup script's ``test`` command::
3131

3232
python setup.py test
3333

34-
in the root directory of the distribution.
35-
The script can take any of the usual `nosetest arguments`_, such as
36-
37-
=================== ===========
38-
``--nose-verbose`` increase verbosity
39-
``-d`` detailed error messages
40-
``--with-coverage`` enable collecting coverage information
41-
=================== ===========
34+
in the root directory of the distribution. The script takes a set of
35+
commands, such as:
36+
37+
======================== ===========
38+
``--pep8-only`` pep8 checks
39+
``--omit-pep8`` Do not perform pep8 checks
40+
``--nocapture`` do not capture stdout (nosetests)
41+
``--nose-verbose`` be verbose (nosetests)
42+
``--processes`` number of processes (nosetests)
43+
``--process-timeout`` process timeout (nosetests)
44+
``--with-coverage`` with coverage
45+
``--detailed-error-msg`` detailed error message (nosetest)
46+
``--tests`` comma separated selection of tests (nosetest)
47+
======================== ===========
4248

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

47-
python tests.py matplotlib.tests.test_simplification:test_clipping
48-
49-
If you want to run the full test suite, but want to save wall time try running the
50-
tests in parallel::
53+
python setup.py tests --tests=matplotlib.tests.test_simplification:test_clipping
5154

52-
python ../matplotlib/tests.py -sv --processes=5 --process-timeout=300
55+
If you want to run the full test suite, but want to save wall time try
56+
running the tests in parallel::
5357

58+
python setup.py test --nocapture --nose-verbose --processes=5 --process-timeout=300
5459

5560

5661
An alternative implementation that does not look at command line
57-
arguments works from within Python::
62+
arguments works from within Python is to run the tests from the
63+
matplotlibs library function :func:`matplotlib.test`::
5864

5965
import matplotlib
6066
matplotlib.test()
6167

68+
.. hint::
69+
70+
You might need to install nose for this::
71+
72+
pip install nose
73+
74+
6275
.. _`nosetest arguments`: http://nose.readthedocs.org/en/latest/usage.html
6376

6477

65-
Running tests by any means other than `matplotlib.test()`
66-
does not load the nose "knownfailureif" (Known failing tests) plugin,
67-
causing known-failing tests to fail for real.
78+
Running tests by any means other than `matplotlib.test()` does not
79+
load the nose "knownfailureif" (Known failing tests) plugin, causing
80+
known-failing tests to fail for real.
6881

6982
Writing a simple test
7083
---------------------

0 commit comments

Comments
 (0)