bernhard: thuban/Extensions/svgexport/test test_svgmapwriter.py, 1.18, 1.19

cvs@intevation.de cvs at intevation.de
Mon Dec 27 18:00:17 CET 2004


Author: bernhard

Update of /thubanrepository/thuban/Extensions/svgexport/test
In directory doto:/tmp/cvs-serv1044/Extensions/svgexport/test

Modified Files:
	test_svgmapwriter.py 
Log Message:
	svgexport 1.0.0cvs: Fixed label export.

	* Extensions/svgexport/test/test_svgmapwriter.py:
	class TestSVGRenderer(): New class; new test test_label_font().

	* Extensions/svgexport/svgmapwriter.py
	(SVGRenderer.label_font()): initialised Font size with self.factor now, 
	makes test_label_font happy.

	* Extensions/svgexport/TODO: crossed out fixed label export item.
	Added item for options.

	* Extensions/svgexport/__init__.py: Bumped version to 1.0.0cvs.


Index: test_svgmapwriter.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/svgexport/test/test_svgmapwriter.py,v
retrieving revision 1.18
retrieving revision 1.19
diff -u -d -r1.18 -r1.19
--- test_svgmapwriter.py	19 Dec 2004 10:14:38 -0000	1.18
+++ test_svgmapwriter.py	27 Dec 2004 17:00:15 -0000	1.19
@@ -354,10 +354,24 @@
         self.assertRaises(SVGMapWriterError,
                 renderer.RenderMap, None, None)
 
+class TestSVGRenderer(BaseTestWithDC):
+    """Test methods of SVGRenderer."""
+
+    def test_label_font(self):
+        """Test that label_font used the self.factor."""
+        mockmap = Map("mock title")
+        self.to_destroy.append(mockmap)
+        renderer = SVGRenderer(self.dc, mockmap,
+                    scale=1.0, offset=(0,0), region=(0,0,30000,30000))
+        #print renderer.factor
+        self.assertEqual( renderer.label_font().GetPointSize(),
+                          12*renderer.factor
+                        )
+
 class Testobjectexport(BaseTestWithDC):
 
     def test_transparent_polygon(self):
-        """ Create layer with non-filled polygon and test svg rendering."""
+        """Create layer with non-filled polygon and test svg rendering."""
 
         data = ('<clipPath id="mapclip">\n'
                 '    <rect x="0" y="0" width="10" height="10"   />\n'





More information about the Thuban-devel mailing list

This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)