@@ -5,7 +5,7 @@ Coding guide
5
5
************
6
6
7
7
Committing changes
8
- ------------------
8
+ ==================
9
9
10
10
When committing changes to matplotlib, there are a few things to bear
11
11
in mind.
@@ -358,7 +358,6 @@ object::
358
358
print 'datafile', datafile
359
359
360
360
361
- .. _license-discussion :
362
361
363
362
364
363
@@ -376,17 +375,31 @@ please ignore it while we consolidate our testing to these locations.)
376
375
Running the tests
377
376
-----------------
378
377
379
- Running the tests is simple. Make sure you have nose installed and
380
- type from within Python::
378
+ Running the tests is simple. Make sure you have nose installed and run
379
+ the script :file: `tests.py ` in the root directory of the distribution.
380
+ The script can take any of the usual `nosetest arguments `_, such as
381
+
382
+ =================== ===========
383
+ ``-v `` increase verbosity
384
+ ``-d `` detailed error messages
385
+ ``--with-coverage `` enable collecting coverage information
386
+ =================== ===========
387
+
388
+ To run a single test from the command line, you can provide a
389
+ dot-separated path to the module followed by the function separated by
390
+ a colon, eg. (this is assuming the test is installed)::
391
+
392
+ python tests.py matplotlib.tests.test_simplification:test_clipping
393
+
394
+ An alternative implementation that does not look at command line
395
+ arguments works from within Python::
381
396
382
397
import matplotlib
383
398
matplotlib.test()
384
399
385
- To run a single test from the command line, you can provide
386
- a dot-separated path to the module and function, eg.
387
- (this is assuming the test is installed)::
388
400
389
- nosetests matplotlib.tests.test_simplification:test_clipping
401
+ .. _`nosetest arguments` : http://somethingaboutorange.com/mrl/projects/nose/1.0.0/usage.html
402
+
390
403
391
404
392
405
Writing a simple test
@@ -482,6 +495,8 @@ Let's say you've added a new module named
482
495
the list of default tests, append its name to ``default_test_modules ``
483
496
in :file: `lib/matplotlib/__init__.py `.
484
497
498
+ .. _license-discussion :
499
+
485
500
Licenses
486
501
========
487
502
0 commit comments