[Zope3-checkins] CVS: Zope3/src/zope/i18n/tests - test_xmllocales.py:1.6

Jeremy Hylton cvs-admin at zope.org
Mon Nov 3 16:27:09 EST 2003


Update of /cvs-repository/Zope3/src/zope/i18n/tests
In directory cvs.zope.org:/tmp/cvs-serv2006

Modified Files:
	test_xmllocales.py 
Log Message:
Simplify test and code used to disable them.


=== Zope3/src/zope/i18n/tests/test_xmllocales.py 1.5 => 1.6 ===
--- Zope3/src/zope/i18n/tests/test_xmllocales.py:1.5	Tue Mar 25 09:48:02 2003
+++ Zope3/src/zope/i18n/tests/test_xmllocales.py	Mon Nov  3 16:27:09 2003
@@ -22,17 +22,12 @@
 from zope.i18n.format import parseDateTimePattern, parseNumberPattern
 
 class LocaleXMLFileTestCase(TestCase):
-    """This test verifies that every locale XML fiel can be loaded."""
+    """This test verifies that every locale XML file can be loaded."""
 
     def __init__(self, path):
         self.__path = path
         TestCase.__init__(self)
         
-    # For unittest.
-    def shortDescription(self):
-        filename = os.path.split(self.__path)[-1]
-        return '%s (Test  XML-Locale Files)' %filename
-
     def runTest(self):
         # Loading Locale object 
         locale = XMLLocaleFactory(self.__path)()
@@ -52,19 +47,19 @@
                     self.assert_(parseDateTimePattern(pattern) is not None)
                     
 
-def test_suite():
-    suite = TestSuite()
-    from zope import i18n
-    locale_dir = os.path.join(os.path.dirname(i18n.__file__), 'locales')
-    for file in filter(lambda f: f.endswith('.xml'),
-                       os.listdir(locale_dir))[:]:
-        path = os.path.join(locale_dir, file)
-        case = LocaleXMLFileTestCase(path)
-        suite.addTest(case)
-    return suite
+##def test_suite():
+##    suite = TestSuite()
+##    locale_dir = os.path.join(os.path.dirname(zope.i18n.__file__), "locales")
+##    for path in os.listdir(locale_dir):
+##        if 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 TestSuite((makeSuite(LocaleXMLFileTestCase),))
+    return None




More information about the Zope3-Checkins mailing list