jan: thuban/Extensions/svgexport/test test_svgmapwriter.py, 1.6, 1.7

cvs@intevation.de cvs at intevation.de
Wed Nov 24 23:21:30 CET 2004


Author: jan

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

Modified Files:
	test_svgmapwriter.py 
Log Message:
Fixes to have the test run correctly even if the extension is a package.
Also removed the "import Thuban" which makes no sense.


Index: test_svgmapwriter.py
===================================================================
RCS file: /thubanrepository/thuban/Extensions/svgexport/test/test_svgmapwriter.py,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -d -r1.6 -r1.7
--- test_svgmapwriter.py	22 Nov 2004 11:17:47 -0000	1.6
+++ test_svgmapwriter.py	24 Nov 2004 22:21:28 -0000	1.7
@@ -1,7 +1,8 @@
-# Copyright (c) 2001, 2002, 2003, 2004 by Intevation GmbH
+# Copyright (c) 2004 by Intevation GmbH
 # Authors:
-#     Markus Rechtien <markus at intevation.de>
-#     Bernhard Reiter <bernhard at intevation.de>
+# Markus Rechtien <markus at intevation.de> (2004)
+# Bernhard Reiter <bernhard at intevation.de> (2004)
+# Jan-Oliver Wagner <jan at intevation.de> (2004)
 #
 # This program is free software under the GPL (>=v2)
 # Read the file COPYING coming with Thuban for details.
@@ -19,18 +20,20 @@
 import StringIO
 import unittest
 
-# If run directly as a script, add Thuban's test directory to the path.
-# Otherwise we assume that the importing code as already done it
+# If run directly as a script, add Thuban's test directory to the path
+# as well as the extensions own directory (i.e. parent).
+# Otherwise we assume that the importing code has already done it.
 if __name__ == "__main__":
     sys.path.append(os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])),
                                  "..", "..", "..", "test"))
+    sys.path.append(os.path.join(os.path.abspath(os.path.dirname(sys.argv[0])),
+                                 ".."))
 from mockgeo import SimpleShapeStore
 import support
 support.initthuban()
-import Thuban
 
 # Now import needed SVG stuff
-from Extensions.svgexport.svgmapwriter import VirtualDC, \
+from svgmapwriter import VirtualDC, \
      Pen, Brush, SOLID,  Point, Font, TRANSPARENT_PEN, TRANSPARENT_BRUSH, \
      SVGRenderer, SVGMapWriterError
 # Color related classes from the model of thuban





More information about the Thuban-devel mailing list

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