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

Skip to content

Commit bd4aaf1

Browse files
committed
Adapt testing guide
1 parent 3db8e63 commit bd4aaf1

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
@@ -36,43 +36,40 @@ Optionally you can install:
3636
Running the tests
3737
-----------------
3838

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

42-
python setup.py test
41+
python tests.py
4342

4443
in the root directory of the distribution. The script takes a set of
4544
commands, such as:
4645

4746
======================== ===========
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
5750
======================== ===========
5851

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+
doumentation for supported arguments. Some of the more important ones are given
54+
here:
6055

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

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

70-
python setup.py test --tests=matplotlib.tests.test_simplification:test_clipping
67+
python tests.py matplotlib.tests.test_simplification:test_clipping
7168

7269
If you want to run the full test suite, but want to save wall time try
7370
running the tests in parallel::
7471

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
7673

7774

7875
An alternative implementation that does not look at command line
@@ -84,9 +81,10 @@ matplotlib library function :func:`matplotlib.test`::
8481

8582
.. hint::
8683

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

8986
pip install nose
87+
pip install mock
9088

9189

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

0 commit comments

Comments
 (0)