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

Skip to content

Commit 4356063

Browse files
committed
Update testing documentation
1 parent 148d3e2 commit 4356063

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
@@ -41,14 +41,20 @@ the setup script's ``test`` command::
4141

4242
python setup.py test
4343

44-
in the root directory of the distribution.
45-
The script can take any of the usual `nosetest arguments`_, such as
46-
47-
=================== ===========
48-
``--nose-verbose`` increase verbosity
49-
``-d`` detailed error messages
50-
``--with-coverage`` enable collecting coverage information
51-
=================== ===========
44+
in the root directory of the distribution. The script takes a set of
45+
commands, such as:
46+
47+
======================== ===========
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)
57+
======================== ===========
5258

5359
Additionally it is possible to run only coding standard test or disable them:
5460

@@ -61,27 +67,34 @@ To run a single test from the command line, you can provide a
6167
dot-separated path to the module followed by the function separated by
6268
a colon, e.g., (this is assuming the test is installed)::
6369

64-
python tests.py matplotlib.tests.test_simplification:test_clipping
65-
66-
If you want to run the full test suite, but want to save wall time try running the
67-
tests in parallel::
70+
python setup.py tests --tests=matplotlib.tests.test_simplification:test_clipping
6871

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

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

7277

7378
An alternative implementation that does not look at command line
74-
arguments works from within Python::
79+
arguments works from within Python is to run the tests from the
80+
matplotlibs library function :func:`matplotlib.test`::
7581

7682
import matplotlib
7783
matplotlib.test()
7884

85+
.. hint::
86+
87+
You might need to install nose for this::
88+
89+
pip install nose
90+
91+
7992
.. _`nosetest arguments`: http://nose.readthedocs.org/en/latest/usage.html
8093

8194

82-
Running tests by any means other than `matplotlib.test()`
83-
does not load the nose "knownfailureif" (Known failing tests) plugin,
84-
causing known-failing tests to fail for real.
95+
Running tests by any means other than `matplotlib.test()` does not
96+
load the nose "knownfailureif" (Known failing tests) plugin, causing
97+
known-failing tests to fail for real.
8598

8699
Writing a simple test
87100
---------------------

0 commit comments

Comments
 (0)