[Thuban-commits] r2705 - in trunk/thuban: . test

scm-commit@wald.intevation.org scm-commit at wald.intevation.org
Sun Sep 24 20:55:31 CEST 2006


Author: bernhard
Date: 2006-09-24 20:55:30 +0200 (Sun, 24 Sep 2006)
New Revision: 2705

Modified:
   trunk/thuban/ChangeLog
   trunk/thuban/test/runtests.py
   trunk/thuban/test/test_transientdb.py
Log:
* test/runtests.py: Added new option ---setdecimalcommalocale
to run all tests with an LC_NUMERIC that uses comma as decimal_point.
Minor: Added (c) year 2006. Fixed typo in a docstring.

* test/test_transientdb.py: Minor: Added (c) year 2006. Fixed typo in
a docstring.


Modified: trunk/thuban/ChangeLog
===================================================================
--- trunk/thuban/ChangeLog	2006-09-24 18:52:59 UTC (rev 2704)
+++ trunk/thuban/ChangeLog	2006-09-24 18:55:30 UTC (rev 2705)
@@ -1,3 +1,12 @@
+2006-09-24 Bernhard Reiter <bernhard at intevation.de>
+
+	* test/runtests.py: Added new option ---setdecimalcommalocale
+   	to run all tests with an LC_NUMERIC that uses comma as decimal_point.
+	Minor: Added (c) year 2006. Fixed typo in a docstring.
+
+	* test/test_transientdb.py: Minor: Added (c) year 2006. Fixed typo in
+	a docstring.
+
 2006-09-23 Bernhard Reiter <bernhard at intevation.de>
 
 	* Extensions/ogr/test/test_OGRShapestore.py: fixed skip_if_no_ogr()

Modified: trunk/thuban/test/runtests.py
===================================================================
--- trunk/thuban/test/runtests.py	2006-09-24 18:52:59 UTC (rev 2704)
+++ trunk/thuban/test/runtests.py	2006-09-24 18:55:30 UTC (rev 2705)
@@ -1,4 +1,4 @@
-# Copyright (c) 2002, 2003, 2004, 2005 by Intevation GmbH
+# Copyright (c) 2002, 2003, 2004, 2005, 2006 by Intevation GmbH
 # Authors:
 # Bernhard Herzog <bh at intevation.de>
 #
@@ -60,7 +60,7 @@
 def main():
     """Run all the tests in the Thuban test suite"""
 
-    # Turn Thuban's deprecation warnings into errors so they're cought
+    # Turn Thuban's deprecation warnings into errors so they're caught
     # by the tests
     #
     # Maintenance: Keep a warning filter until the backwards
@@ -75,12 +75,17 @@
     verbosity = 1
 
     opts, args = getopt.getopt(sys.argv[1:], 'v',
-                               ['verbose', "internal-encoding="])
+                ['verbose', 'setdecimalcommalocale', "internal-encoding="])
     for optchar, value in opts:
         if optchar in ("-v", "--verbose"):
             verbosity = 2
         elif optchar == "--internal-encoding":
             Thuban.set_internal_encoding(value)
+        elif optchar == "--setdecimalcommalocale":
+            import localessupport
+            oldlocale = localessupport.setdecimalcommalocale()
+            if oldlocale == None:
+                print>>sys.stderr, "Did not find a locale with comma."
         else:
             print>>sys.stderr, "Unknown option", optchar
 

Modified: trunk/thuban/test/test_transientdb.py
===================================================================
--- trunk/thuban/test/test_transientdb.py	2006-09-24 18:52:59 UTC (rev 2704)
+++ trunk/thuban/test/test_transientdb.py	2006-09-24 18:55:30 UTC (rev 2705)
@@ -1,4 +1,4 @@
-# Copyright (c) 2002, 2003 by Intevation GmbH
+# Copyright (c) 2002, 2003, 2006 by Intevation GmbH
 # Authors:
 # Bernhard Herzog <bh at intevation.de>
 #
@@ -43,7 +43,7 @@
         self.transientdb.close()
 
     def run_iceland_political_tests(self, table):
-        """Run some tests on tablte
+        """Run some tests on table
 
         Assume that table holds the data of the file
         ../Data/iceland/political.dbf sample file.



More information about the Thuban-commits mailing list