Revision: 6059
          http://matplotlib.svn.sourceforge.net/matplotlib/?rev=6059&view=rev
Author:   efiring
Date:     2008-09-01 22:27:07 +0000 (Mon, 01 Sep 2008)

Log Message:
-----------
Improve backend_driver error reporting.

Modified Paths:
--------------
    trunk/matplotlib/examples/pylab_examples/image_nonuniform.py
    trunk/matplotlib/examples/pylab_examples/stix_fonts_demo.py
    trunk/matplotlib/examples/tests/backend_driver.py

Modified: trunk/matplotlib/examples/pylab_examples/image_nonuniform.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/image_nonuniform.py        
2008-09-01 21:09:09 UTC (rev 6058)
+++ trunk/matplotlib/examples/pylab_examples/image_nonuniform.py        
2008-09-01 22:27:07 UTC (rev 6059)
@@ -13,7 +13,7 @@
 x = np.linspace(-4, 4, 9)
 x2 = x**3
 y = np.linspace(-4, 4, 9)
-print 'Size %d points' % (len(x) * len(y))
+#print 'Size %d points' % (len(x) * len(y))
 z = np.sqrt(x[np.newaxis,:]**2 + y[:,np.newaxis]**2)
 
 fig = figure()

Modified: trunk/matplotlib/examples/pylab_examples/stix_fonts_demo.py
===================================================================
--- trunk/matplotlib/examples/pylab_examples/stix_fonts_demo.py 2008-09-01 
21:09:09 UTC (rev 6058)
+++ trunk/matplotlib/examples/pylab_examples/stix_fonts_demo.py 2008-09-01 
22:27:07 UTC (rev 6059)
@@ -31,7 +31,7 @@
     axis([0, 3, -len(tests), 0])
     yticks(arange(len(tests)) * -1)
     for i, s in enumerate(tests):
-        print (i, s.encode("ascii", "backslashreplace"))
+        #print (i, s.encode("ascii", "backslashreplace"))
         text(0.1, -i, s, fontsize=32)
 
     savefig('stix_fonts_example')

Modified: trunk/matplotlib/examples/tests/backend_driver.py
===================================================================
--- trunk/matplotlib/examples/tests/backend_driver.py   2008-09-01 21:09:09 UTC 
(rev 6058)
+++ trunk/matplotlib/examples/tests/backend_driver.py   2008-09-01 22:27:07 UTC 
(rev 6059)
@@ -204,7 +204,7 @@
             os.unlink(os.path.join(path,fname))
     else:
         os.mkdir(backend)
-
+    failures = []
     for fullpath in files:
 
         print ('\tdriving %-40s' % (fullpath)),
@@ -257,10 +257,14 @@
         print (end_time - start_time), ret
         #os.system('%s %s %s' % (python, tmpfile_name, switchstring))
         os.remove(tmpfile_name)
+        if ret:
+            failures.append(fullpath)
+    return failures
 
 
 if __name__ == '__main__':
     times = {}
+    failures = {}
     default_backends = ['agg', 'ps', 'svg', 'pdf', 'template']
     if len(sys.argv)==2 and sys.argv[1]=='--clean':
         localdirs = [d for d in glob.glob('*') if os.path.isdir(d)]
@@ -299,13 +303,16 @@
         switchstring = ' '.join(switches)
         print 'testing %s %s' % (backend, switchstring)
         t0 = time.time()
-        drive(backend, python, switches)
+        failures[backend] = drive(backend, python, switches)
         t1 = time.time()
         times[backend] = (t1-t0)/60.0
 
     # print times
     for backend, elapsed in times.items():
         print 'Backend %s took %1.2f minutes to complete' % ( backend, elapsed)
+        failed = failures[backend]
+        if failed:
+            print '  Failures: ', failed
         if 'Template' in times:
             print '\ttemplate ratio %1.3f, template residual %1.3f' % (
                 elapsed/times['Template'], elapsed-times['Template'])


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

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Matplotlib-checkins mailing list
Matplotlib-checkins@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins

Reply via email to