Revision: 7733
http://matplotlib.svn.sourceforge.net/matplotlib/?rev=7733&view=rev
Author: astraw
Date: 2009-09-10 22:32:08 +0000 (Thu, 10 Sep 2009)
Log Message:
-----------
testing: add test for SF#2856495
Modified Paths:
--------------
trunk/matplotlib/lib/matplotlib/__init__.py
Added Paths:
-----------
trunk/matplotlib/lib/matplotlib/tests/test_backend_svg.py
Modified: trunk/matplotlib/lib/matplotlib/__init__.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/__init__.py 2009-09-10 11:39:23 UTC (rev
7732)
+++ trunk/matplotlib/lib/matplotlib/__init__.py 2009-09-10 22:32:08 UTC (rev
7733)
@@ -878,6 +878,7 @@
default_test_modules = [
'matplotlib.tests.test_agg',
+ 'matplotlib.tests.test_backend_svg',
'matplotlib.tests.test_basic',
'matplotlib.tests.test_cbook',
'matplotlib.tests.test_transforms',
Added: trunk/matplotlib/lib/matplotlib/tests/test_backend_svg.py
===================================================================
--- trunk/matplotlib/lib/matplotlib/tests/test_backend_svg.py
(rev 0)
+++ trunk/matplotlib/lib/matplotlib/tests/test_backend_svg.py 2009-09-10
22:32:08 UTC (rev 7733)
@@ -0,0 +1,30 @@
+import matplotlib.pyplot as plt
+import numpy as np
+import cStringIO as StringIO
+import xml.parsers.expat
+from matplotlib.testing.decorators import knownfailureif
+
+...@knownfailureif(True)
+def test_visibility():
+ # This is SF 2856495. See
+ #
https://sourceforge.net/tracker/?func=detail&aid=2856495&group_id=80706&atid=560720
+ fig=plt.figure()
+ ax=fig.add_subplot(1,1,1)
+
+ x = np.linspace(0,4*np.pi,50)
+ y = np.sin(x)
+ yerr = np.ones_like(y)
+
+ a,b,c=ax.errorbar(x,y,yerr=yerr,fmt='ko')
+ for artist in b:
+ artist.set_visible(False)
+
+ fd = StringIO.StringIO()
+ fig.savefig(fd,format='svg')
+
+ fd.seek(0)
+ buf = fd.read()
+ fd.close()
+
+ parser = xml.parsers.expat.ParserCreate()
+ parser.Parse(buf) # this will raise ExpatError if the svg is invalid
This was sent by the SourceForge.net collaborative development platform, the
world's largest Open Source development site.
------------------------------------------------------------------------------
Let Crystal Reports handle the reporting - Free Crystal Reports 2008 30-Day
trial. Simplify your report design, integration and deployment - and focus on
what you do best, core application coding. Discover what's new with
Crystal Reports now. http://p.sf.net/sfu/bobj-july
_______________________________________________
Matplotlib-checkins mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/matplotlib-checkins