[kupu-checkins] r55126 - kupu/trunk/kupu/plone/tests

duncan at codespeak.net duncan at codespeak.net
Thu May 22 13:19:06 CEST 2008


Author: duncan
Date: Thu May 22 13:19:05 2008
New Revision: 55126

Modified:
   kupu/trunk/kupu/plone/tests/test_i18n.py
Log:
Make Hanno's I18n tests not fail when i18ndude is not available


Modified: kupu/trunk/kupu/plone/tests/test_i18n.py
==============================================================================
--- kupu/trunk/kupu/plone/tests/test_i18n.py	(original)
+++ kupu/trunk/kupu/plone/tests/test_i18n.py	Thu May 22 13:19:05 2008
@@ -11,6 +11,7 @@
 except ImportError:
     HAS_I18NDUDE = False
 
+tests=[]
 if HAS_I18NDUDE:
     GLOBALS = globals()
     PACKAGE_HOME = os.path.normpath(os.path.join(package_home(GLOBALS), '..', '..'))
@@ -21,7 +22,6 @@
 
     i18ndir = os.path.normpath(PACKAGE_HOME)
 
-    tests=[]
     products=[]
     pots={}
     pot_catalogs={}
@@ -52,9 +52,9 @@
                 pot_len = pot_lens[product]
             tests.append(TestOnePoFile)
 
-        import unittest
-        def test_suite():
-            suite = unittest.TestSuite()
-            for test in tests:
-                suite.addTest(unittest.makeSuite(test))
-            return suite
+import unittest
+def test_suite():
+    suite = unittest.TestSuite()
+    for test in tests:
+        suite.addTest(unittest.makeSuite(test))
+    return suite


More information about the kupu-checkins mailing list