@@ -41,14 +41,20 @@ the setup script's ``test`` command::
41
41
42
42
python setup.py test
43
43
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
+ ======================== ===========
52
58
53
59
Additionally it is possible to run only coding standard test or disable them:
54
60
@@ -61,27 +67,34 @@ To run a single test from the command line, you can provide a
61
67
dot-separated path to the module followed by the function separated by
62
68
a colon, e.g., (this is assuming the test is installed)::
63
69
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
68
71
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::
70
74
75
+ python setup.py test --nocapture --nose-verbose --processes=5 --process-timeout=300
71
76
72
77
73
78
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 `::
75
81
76
82
import matplotlib
77
83
matplotlib.test()
78
84
85
+ .. hint ::
86
+
87
+ You might need to install nose for this::
88
+
89
+ pip install nose
90
+
91
+
79
92
.. _`nosetest arguments` : http://nose.readthedocs.org/en/latest/usage.html
80
93
81
94
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.
85
98
86
99
Writing a simple test
87
100
---------------------
0 commit comments