[Thuban-commits] r2786 - in trunk/thuban: . Extensions/wms/test

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Wed Nov 28 00:54:46 CET 2007


Author: bernhard
Date: 2007-11-28 00:54:45 +0100 (Wed, 28 Nov 2007)
New Revision: 2786

Modified:
   trunk/thuban/ChangeLog
   trunk/thuban/Extensions/wms/test/test_parser.py
Log:
Extensions/wms/test/test_parser.py: removed import of adjustpath,
but instead used the same method as other Extensions to call
the support.initthuban() function from the toplevel "test" directory.


Modified: trunk/thuban/ChangeLog
===================================================================
--- trunk/thuban/ChangeLog	2007-11-27 23:39:49 UTC (rev 2785)
+++ trunk/thuban/ChangeLog	2007-11-27 23:54:45 UTC (rev 2786)
@@ -2,6 +2,10 @@
 
 	Wms-Extension: some fixes in order to make it work again.
 
+	*  Extensions/wms/test/test_parser.py: removed import of adjustpath,
+	but instead used the same method as other Extensions to call
+	the support.initthuban() function from the toplevel "test" directory.
+
 	* Extensions/wms/infodialog.py(calcText()): removed encode('latin1')
 	as the Title already should be in the internal Thuban encoding.
 

Modified: trunk/thuban/Extensions/wms/test/test_parser.py
===================================================================
--- trunk/thuban/Extensions/wms/test/test_parser.py	2007-11-27 23:39:49 UTC (rev 2785)
+++ trunk/thuban/Extensions/wms/test/test_parser.py	2007-11-27 23:54:45 UTC (rev 2786)
@@ -29,9 +29,17 @@
 
 import os
 import unittest
+import sys
 
-import adjustpath
 
+# If run directly as a script, add Thuban's test directory to the path.
+# 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"))
+import support
+support.initthuban()
+
 from Extensions.wms.parser import WMSCapabilitiesParser
 
 



More information about the Thuban-commits mailing list