I’ve been trying to run the matplotlib test suite but the docs seem incomplete on this subject.
http://matplotlib.github.com/devel/coding_guide.html#running-the-tests
Running the tests is simple. Make sure you have nose installed and type from within Python:
import matplotlib
matplotlib.test()
To run a single test from the command line, you can provide a dot-separated path to the module and function, eg. (this is assuming the test is installed):
nosetests matplotlib.tests.test_simplification:test_clipping
Most test fail when I do what is suggested because PIL is not installed and is a requirement for all image_comparison tests.
A bit more information in the docs would be helpful for first time testers.
IMO the optional dependencies required for running the test suite should be listed (possibly in the installation guide:
http://matplotlib.github.com/users/installing.html )
and info should be provided on how to run only the tests that don’t require PIL.
matplotlib.test()
…
···
======================================================================
ERROR: matplotlib.tests.test_mathtext.test_mathtext_stixsans
Traceback (most recent call last):
File “C:\Python26\lib\site-packages\nose-1.0.0-py2.6.egg\nose\case.py”, line 187, in runTest
self.test(*self.arg)
File “C:\Python26\lib\site-packages\matplotlib\testing\decorators.py”, line 32, in failer
result = f(*args, **kwargs)
File “C:\Python26\lib\site-packages\matplotlib\testing\decorators.py”, line 122, in decorated_co
mpare_images
in_decorator=True )
File “C:\Python26\lib\site-packages\matplotlib\testing\compare.py”, line 187, in compare_images
raise NotImplementedError, e
NotImplementedError: No module named PIL
Ran 150 tests in 143.964s
FAILED (KNOWNFAIL=2, errors=133)
Out[4]: False