I've committed support for comparing SVG files using Inkscape and 
verifying them against the official SVG DTD using xmllint.

Michael Droettboom wrote:
> Andrew Straw wrote:
>   
>> Done in r7863. To make use of it, do something like the following patch
>> (and don't forget to delete the baseline .pdf files from the repository):
>>
>> -...@image_comparison(baseline_images=['simplify_curve'])
>> +...@image_comparison(baseline_images=['simplify_curve'],extensions=['png'])
>>   
>>     
> Great!
>   
This is a nice feature.  However, in hindsight, I may not use it right 
away -- I actually found a bug in the SVG backend using one of the tests 
I assumed would only affect the Agg backend.  :)

  

A couple more comments about the test framework -- which has already 
paid for itself ten times over.  In Numpy (and a number of local Python 
projects), I can 'cd' to the tests directory and do something like:

   nosetests test_simplification.py:test_hatch_simplify

and run on particular test, or a single file of tests.  It's a huge time 
saver when trying to fix a bug.  However, with matplotlib I get:

 > nosetests test_simplification.py
E
======================================================================
ERROR: Failure: ImportError (cannot import name cbook)
----------------------------------------------------------------------
Traceback (most recent call last):
  File 
"/wonkabar/data1/usr/lib/python2.5/site-packages/nose-0.11.1-py2.5.egg/nose/loader.py",
 
line 379, in loadTestsFromName
    addr.filename, addr.module)
  File 
"/wonkabar/data1/usr/lib/python2.5/site-packages/nose-0.11.1-py2.5.egg/nose/importer.py",
 
line 39, in importFromPath
    return self.importFromDir(dir_path, fqname)
  File 
"/wonkabar/data1/usr/lib/python2.5/site-packages/nose-0.11.1-py2.5.egg/nose/importer.py",
 
line 86, in importFromDir
    mod = load_module(part_fqname, fh, filename, desc)
  File 
"/wonkabar/data1/builds/matplotlib/build/lib.linux-i686-2.5/matplotlib/tests/test_simplification.py",
 
line 4, in <module>
    import matplotlib.pyplot as plt
  File 
"/wonkabar/data1/builds/matplotlib/build/lib.linux-i686-2.5/matplotlib/pyplot.py",
 
line 6, in <module>
    from matplotlib import docstring
  File 
"/wonkabar/data1/builds/matplotlib/build/lib.linux-i686-2.5/matplotlib/docstring.py",
 
line 1, in <module>
    from matplotlib import cbook
ImportError: cannot import name cbook

----------------------------------------------------------------------
Ran 1 test in 0.009s

FAILED (errors=1)


I suspect this is something peculiar to how matplotlib gets imported.

Also, I have a quad-core machine, so I put this in my .noserc, which 
will run tests in parallel:

   [nosetests]
   processes=4

Unfortunately, due to however matplotlib is delegating to nose, this 
doesn't seem to get picked up.

I don't know if I'll get a chance to look at these things right away, 
but thought I'd share in case the solutions are obvious to anyone else 
(which I know isn't good form, but hey... ;)

Cheers,
Mike

-- 
Michael Droettboom
Science Software Branch
Operations and Engineering Division
Space Telescope Science Institute
Operated by AURA for NASA


------------------------------------------------------------------------------
Come build with us! The BlackBerry(R) Developer Conference in SF, CA
is the only developer event you need to attend this year. Jumpstart your
developing skills, take BlackBerry mobile applications to market and stay 
ahead of the curve. Join us from November 9 - 12, 2009. Register now!
http://p.sf.net/sfu/devconference
_______________________________________________
Matplotlib-devel mailing list
Matplotlib-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-devel

Reply via email to