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

Skip to content

Commit d0cf23d

Browse files
committed
Merge pull request matplotlib#1470 from NelleV/test_coverage
Add ``test`` and ``test-coverage`` to Makefile
2 parents 8b13952 + 351308f commit d0cf23d

File tree

3 files changed

+40
-18
lines changed

3 files changed

+40
-18
lines changed

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,11 @@ jdh_doc_snapshot:
4444
python make.py html latex sf sfpdf;
4545

4646

47+
test:
48+
${PYTHON} tests.py
4749

4850

51+
test-coverage:
52+
${PYTHON} tests.py --with-coverage --cover-package=matplotlib
53+
4954

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+
python tests.py
23+
24+
Consider reading http://matplotlib.org/devel/coding_guide.html#testing for
25+
more information.

doc/devel/coding_guide.rst

Lines changed: 19 additions & 18 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
------------
@@ -386,33 +386,34 @@ Running the tests
386386

387387
Running the tests is simple. Make sure you have nose installed and run
388388
the script :file:`tests.py` in the root directory of the distribution.
389+
389390
The script can take any of the usual `nosetest arguments`_, such as
390391

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

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)::
398+
To run a single test from the command line, you can provide a
399+
dot-separated path to the module followed by the function separated by
400+
a colon, eg. (this is assuming the test is installed)::
400401

401-
python tests.py matplotlib.tests.test_simplification:test_clipping
402+
python tests.py matplotlib.tests.test_simplification:test_clipping
402403

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

406-
import matplotlib
407-
matplotlib.test()
407+
import matplotlib
408+
matplotlib.test()
408409

409410

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

412413

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.
414+
Running tests by any means other than `matplotlib.test()`
415+
does not load the nose "knownfailureif" (Known failing tests) plugin,
416+
causing known-failing tests to fail for real.
416417

417418
Writing a simple test
418419
---------------------

0 commit comments

Comments
 (0)