Revision: 8277
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=8277&view=rev
Author:   mdboom
Date:     2010-04-27 19:39:27 +0000 (Tue, 27 Apr 2010)

Log Message:
-----------
Expose tolerance argument to image_comparison decorator.  Use it to raise the 
tolerance for the test_figimage test.

Modified Paths:
--------------
    trunk/matplotlib/lib/matplotlib/testing/decorators.py
    trunk/matplotlib/lib/matplotlib/tests/test_image.py

Modified: trunk/matplotlib/lib/matplotlib/testing/decorators.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/testing/decorators.py       2010-04-27 
00:04:14 UTC (rev 8276)
+++ trunk/matplotlib/lib/matplotlib/testing/decorators.py       2010-04-27 
19:39:27 UTC (rev 8277)
@@ -46,7 +46,7 @@
         return nose.tools.make_decorator(f)(failer)
     return known_fail_decorator
 
-def image_comparison(baseline_images=None,extensions=None):
+def image_comparison(baseline_images=None,extensions=None,tol=1e-3):
     """
     call signature::
 
@@ -118,7 +118,6 @@
                                 'image does not exist: %s'%expected)
 
                         # compare the images
-                        tol=1e-3 # default tolerance
                         err = compare_images( expected, actual, tol,
                                               in_decorator=True )
                         if err:

Modified: trunk/matplotlib/lib/matplotlib/tests/test_image.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/tests/test_image.py 2010-04-27 00:04:14 UTC 
(rev 8276)
+++ trunk/matplotlib/lib/matplotlib/tests/test_image.py 2010-04-27 19:39:27 UTC 
(rev 8277)
@@ -29,7 +29,7 @@
 
     fig.savefig('image_interps')
 
-...@image_comparison(baseline_images=['figimage-0', 'figimage-1'], 
extensions=['png'])
+...@image_comparison(baseline_images=['figimage-0', 'figimage-1'], 
extensions=['png'], tol=1.5e-3)
 def test_figimage():
     'test the figimage method'
 


This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.

------------------------------------------------------------------------------
_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to