@@ -31,40 +31,53 @@ the setup script's ``test`` command::
31
31
32
32
python setup.py test
33
33
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
+ ======================== ===========
42
48
43
49
To run a single test from the command line, you can provide a
44
50
dot-separated path to the module followed by the function separated by
45
51
a colon, e.g., (this is assuming the test is installed)::
46
52
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
51
54
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::
53
57
58
+ python setup.py test --nocapture --nose-verbose --processes=5 --process-timeout=300
54
59
55
60
56
61
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 `::
58
64
59
65
import matplotlib
60
66
matplotlib.test()
61
67
68
+ .. hint ::
69
+
70
+ You might need to install nose for this::
71
+
72
+ pip install nose
73
+
74
+
62
75
.. _`nosetest arguments` : http://nose.readthedocs.org/en/latest/usage.html
63
76
64
77
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.
68
81
69
82
Writing a simple test
70
83
---------------------
0 commit comments