Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 6e441f3

Browse filesBrowse files
committed
Merge pull request #5462 from jenshnielsen/testingdocs15
DOC: Change docs to recommend tests.py rather than setup.py test
2 parents 81f54ba + 5411160 commit 6e441f3
Copy full SHA for 6e441f3

File tree

Expand file treeCollapse file tree

3 files changed

+23
-23
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+23
-23
lines changed

‎README.rst

Copy file name to clipboardExpand all lines: README.rst
+4-2Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,17 @@ Testing
2020

2121
After installation, you can launch the test suite::
2222

23-
python setup.py test
23+
python tests.py
2424

2525
Or from the python interpreter::
2626

2727
import matplotlib
2828
matplotlib.test()
2929

3030
Consider reading http://matplotlib.org/devel/coding_guide.html#testing for
31-
more information.
31+
more information. Note that the test suite requires nose and on python 2.7 mock
32+
which are not installed by default. Please install with pip or your package
33+
manager of choice.
3234

3335
Contact
3436
=======

‎doc/devel/release_guide.rst

Copy file name to clipboardExpand all lines: doc/devel/release_guide.rst
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ A guide for developers who are doing a matplotlib release.
1313
Testing
1414
=======
1515

16-
* Run all of the regression tests by running ``python setup.py test`` script
16+
* Run all of the regression tests by running ``python tests.py``
1717
at the root of the source tree.
1818

1919
* Run :file:`unit/memleak_hawaii3.py` and make sure there are no

‎doc/devel/testing.rst

Copy file name to clipboardExpand all lines: doc/devel/testing.rst
+18-20Lines 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+
documentation 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.