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

Skip to content

Commit 4d29959

Browse files
committed
Added new makefile command make test and make test-coverage to the documentation
1 parent d60dd38 commit 4d29959

File tree

2 files changed

+40
-20
lines changed

2 files changed

+40
-20
lines changed

README.txt

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
matplotlib
2+
==========
3+
14
matplotlib is a python 2D plotting library which produces publication
25
quality figures in a variety of hardcopy formats and interactive
36
environments across platforms. matplotlib can be used in python
@@ -6,4 +9,17 @@ application servers, and various graphical user interface toolkits.
69

710
Home page: <http://matplotlib.org/>
811

12+
13+
Installation
14+
=============
915
For installation instructions and requirements, see the INSTALL file.
16+
17+
Testing
18+
=======
19+
20+
After installation, you can launch the test suite::
21+
22+
$ make test
23+
24+
Consider reading http://matplotlib.org/devel/coding_guide.html#testing for
25+
more information.

doc/devel/coding_guide.rst

Lines changed: 24 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -367,7 +367,7 @@ customizations to the nose testing infrastructure are in
367367
:mod:`matplotlib.testing`. (There is other old testing cruft around,
368368
please ignore it while we consolidate our testing to these locations.)
369369

370-
.. _nose: http://somethingaboutorange.com/mrl/projects/nose/
370+
.. _nose: https://nose.readthedocs.org/en/latest/
371371

372372
Requirements
373373
------------
@@ -384,35 +384,39 @@ The following software is required to run the tests:
384384
Running the tests
385385
-----------------
386386

387-
Running the tests is simple. Make sure you have nose installed and run
388-
the script :file:`tests.py` in the root directory of the distribution.
387+
Running the tests is simple. Make sure you have nose installed. There are two
388+
options to run tests in matplotlib:
389+
390+
- use the makefile, and type ``make test`` or ``make test-coverage``
391+
392+
- run the script :file:`tests.py` in the root directory of the distribution.
389393
The script can take any of the usual `nosetest arguments`_, such as
390394

391-
=================== ===========
392-
``-v`` increase verbosity
393-
``-d`` detailed error messages
394-
``--with-coverage`` enable collecting coverage information
395-
=================== ===========
395+
=================== ===========
396+
``-v`` increase verbosity
397+
``-d`` detailed error messages
398+
``--with-coverage`` enable collecting coverage information
399+
=================== ===========
396400

397-
To run a single test from the command line, you can provide a
398-
dot-separated path to the module followed by the function separated by
399-
a colon, eg. (this is assuming the test is installed)::
401+
To run a single test from the command line, you can provide a
402+
dot-separated path to the module followed by the function separated by
403+
a colon, eg. (this is assuming the test is installed)::
400404

401-
python tests.py matplotlib.tests.test_simplification:test_clipping
405+
python tests.py matplotlib.tests.test_simplification:test_clipping
402406

403-
An alternative implementation that does not look at command line
404-
arguments works from within Python::
407+
An alternative implementation that does not look at command line
408+
arguments works from within Python::
405409

406-
import matplotlib
407-
matplotlib.test()
410+
import matplotlib
411+
matplotlib.test()
408412

409413

410-
.. _`nosetest arguments`: http://somethingaboutorange.com/mrl/projects/nose/1.0.0/usage.html
414+
.. _`nosetest arguments`: http://somethingaboutorange.com/mrl/projects/nose/1.0.0/usage.html
411415

412416

413-
Running tests by any means other than `matplotlib.test()`
414-
does not load the nose "knownfailureif" (Known failing tests) plugin,
415-
causing known-failing tests to fail for real.
417+
Running tests by any means other than `matplotlib.test()`
418+
does not load the nose "knownfailureif" (Known failing tests) plugin,
419+
causing known-failing tests to fail for real.
416420

417421
Writing a simple test
418422
---------------------

0 commit comments

Comments
 (0)