[Zope3-checkins] SVN: Zope3/trunk/src/zope/i18n/locales/tests/test_xmlfactory.py Renabled the incorrectly disabled test. The proper way to suppress

Jim Fulton jim at zope.com
Sun May 1 10:35:54 EDT 2005


Log message for revision 30223:
  Renabled the incorrectly disabled test.  The proper way to suppress
  tests that take a long time is to increase their level so that they
  are only run with "-all".
  

Changed:
  U   Zope3/trunk/src/zope/i18n/locales/tests/test_xmlfactory.py

-=-
Modified: Zope3/trunk/src/zope/i18n/locales/tests/test_xmlfactory.py
===================================================================
--- Zope3/trunk/src/zope/i18n/locales/tests/test_xmlfactory.py	2005-05-01 14:35:52 UTC (rev 30222)
+++ Zope3/trunk/src/zope/i18n/locales/tests/test_xmlfactory.py	2005-05-01 14:35:53 UTC (rev 30223)
@@ -25,6 +25,9 @@
 class LocaleXMLFileTestCase(TestCase):
     """This test verifies that every locale XML file can be loaded."""
 
+    # only run when running tests of level 2
+    level = 2
+
     def __init__(self, path):
         self.__path = path
         TestCase.__init__(self)
@@ -49,20 +52,14 @@
                 
                     
 
-##def test_suite():
-##    suite = TestSuite()
-##    locale_dir = os.path.join(os.path.dirname(zope.i18n.__file__),
-##                              'locales', 'data')
-##    for path in os.listdir(locale_dir):
-##        if not path.endswith(".xml"):
-##            continue
-##        path = os.path.join(locale_dir, path)
-##        case = LocaleXMLFileTestCase(path)
-##        suite.addTest(case)
-##    return suite
-
-# Note: These tests are disabled, just because they take a long time to run.
-#       You should run these tests if you update the parsing code and/or
-#       update the Locale XML Files.
 def test_suite():
-    return None
+   suite = TestSuite()
+   locale_dir = os.path.join(os.path.dirname(zope.i18n.__file__),
+                             'locales', 'data')
+   for path in os.listdir(locale_dir):
+       if not path.endswith(".xml"):
+           continue
+       path = os.path.join(locale_dir, path)
+       case = LocaleXMLFileTestCase(path)
+       suite.addTest(case)
+   return suite



More information about the Zope3-Checkins mailing list