[Zope-Checkins] CVS: Packages/Zope/Startup/tests - testStarter.py:1.1.2.8

Evan Simpson evan at 4-am.com
Thu Dec 18 15:34:12 EST 2003


Update of /cvs-repository/Packages/Zope/Startup/tests
In directory cvs.zope.org:/tmp/cvs-serv27247/lib/python/Zope/Startup/tests

Modified Files:
      Tag: Zope-2_7-branch
	testStarter.py 
Log Message:
Eliminate 'make test' annoyances.


=== Packages/Zope/Startup/tests/testStarter.py 1.1.2.7 => 1.1.2.8 ===
--- Packages/Zope/Startup/tests/testStarter.py:1.1.2.7	Mon Nov  3 11:43:27 2003
+++ Packages/Zope/Startup/tests/testStarter.py	Thu Dec 18 15:34:10 2003
@@ -81,23 +81,23 @@
 
     def testSetupLocale(self):
         # XXX this almost certainly won't work on all systems
-        import sys
         import locale
-
-        if sys.platform in ('win32',):
-            # fr_FR is unknown on Windows.
-            return
-
         try:
-            conf = self.load_config_text("""
-                instancehome <<INSTANCE_HOME>>
-                locale fr_FR"""
-                )
+            try:
+                conf = self.load_config_text("""
+                    instancehome <<INSTANCE_HOME>>
+                    locale en_GB""")
+            except ZConfig.DataConversionError, e:
+                # Skip this test if we don't have support.
+                if e.message.startswith(
+                    'The specified locale "en_GB" is not supported'):
+                    return
+                raise
             starter = ZopeStarter(conf)
             starter.setupLocale()
-            self.assertEqual(locale.getlocale(), ['fr_FR', 'ISO8859-1'])
+            self.assertEqual(locale.getlocale(), ['en_GB', 'ISO8859-1'])
         finally:
-            # resest to system-defined locale
+            # reset to system-defined locale
             locale.setlocale(locale.LC_ALL, '')
 
     def testSetupStartupHandler(self):




More information about the Zope-Checkins mailing list