bernhard: thuban/Extensions/svgexport/test test_svgmapwriter.py, 1.17, 1.18
cvs@intevation.de
cvs at intevation.de
Sun Dec 19 11:14:40 CET 2004
Author: bernhard
Update of /thubanrepository/thuban/Extensions/svgexport/test
In directory doto:/tmp/cvs-serv326/Extensions/svgexport/test
Modified Files:
test_svgmapwriter.py
Log Message:
svgexport: Improved code quality, mainly by better naming.
* Extensions/svgexport/svgmapwriter.py:
DrawPath() renamed to DrawPolygonPath(),
added documentation, improved comments and variable names.
* Extensions/svgexport/svgmapwriter.py,
Extensions/svgexport/test/test_svgmapwriter.py:
All using DrawPolygonPath() now, the default parameter closed=True
omitted.
* Extensions/svgexport/test/test_svgmapwriter.py:
renamed test_polygon_opened() to test_polyline()
renamed test_transparent_polygon() to test_transparent_polyline()
Index: test_svgmapwriter.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/svgexport/test/test_svgmapwriter.py,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- test_svgmapwriter.py 18 Dec 2004 02:36:59 -0000 1.17
+++ test_svgmapwriter.py 19 Dec 2004 10:14:38 -0000 1.18
@@ -105,12 +105,12 @@
dc.SetPen(self.solid_pen)
dc.SetMeta(self.meta)
dc.SetBrush(self.solid_brush)
- dc.DrawPath([self.polygon], 1)
+ dc.DrawPolygonPath([self.polygon])
self.assertEquals(xmlsupport.sax_eventlist(data=data),
xmlsupport.sax_eventlist(data=self.file.getvalue()))
- def test_polygon_opened(self):
- '''Set drawing properties and draw a polygon onto the dc.'''
+ def test_polyline(self):
+ '''Set drawing properties and draw a polyline onto the dc.'''
data = ('<path style="stroke-linejoin:round; stroke:#ff00ff; '
'stroke-width:3; stroke-linecap:round; fill:#00ff00" '
'meta="Object:test; Label:nothing" d="\nM 5.6 5.5'
@@ -119,12 +119,12 @@
dc.SetPen(self.solid_pen)
dc.SetMeta(self.meta)
dc.SetBrush(self.solid_brush)
- dc.DrawPath([self.polygon], 0)
+ dc.DrawPolygonPath([self.polygon], closed=False)
self.assertEquals(xmlsupport.sax_eventlist(data=data),
xmlsupport.sax_eventlist(data=self.file.getvalue()))
- def test_transparent_polygon(self):
- '''Test dc drawing a transparent polygon.'''
+ def test_transparent_polyline(self):
+ '''Test dc drawing a transparent polyline.'''
data = ('<path style="stroke-linejoin:round; stroke:#ff00ff; '
'stroke-width:3; stroke-linecap:round; fill:none" '
'meta="Object:test; Label:nothing" d="\nM 5.6 5.5'
@@ -133,7 +133,7 @@
dc.SetPen(self.solid_pen)
dc.SetMeta(self.meta)
dc.SetBrush(self.trans_brush)
- dc.DrawPath([self.polygon], 0)
+ dc.DrawPolygonPath([self.polygon], closed=False)
self.assertEquals(xmlsupport.sax_eventlist(data=data),
xmlsupport.sax_eventlist(data=self.file.getvalue()))
@@ -152,7 +152,7 @@
dc.SetPen(self.solid_pen)
dc.SetMeta(self.meta)
dc.SetBrush(self.solid_brush)
- dc.DrawPath([self.polygon, holepolygon], 1)
+ dc.DrawPolygonPath([self.polygon, holepolygon])
self.assertEquals(xmlsupport.sax_eventlist(data=data),
xmlsupport.sax_eventlist(data=self.file.getvalue()))
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)