Commit 602c0fcd authored by Evan Simpson's avatar Evan Simpson

Eliminate some test annoyances.

parent 74ae98ab
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
# FOR A PARTICULAR PURPOSE # FOR A PARTICULAR PURPOSE
# #
############################################################################## ##############################################################################
__version__='$Revision: 1.11 $'[11:-2] __version__='$Revision: 1.12 $'[11:-2]
"""BeforeTraverse interface and helper classes""" """BeforeTraverse interface and helper classes"""
...@@ -141,7 +141,7 @@ class NameCaller: ...@@ -141,7 +141,7 @@ class NameCaller:
2) 2)
try: try:
apply(meth, (container, request, None)[:args]) meth(*(container, request, None)[:args])
except (ArithmeticError, AttributeError, FloatingPointError, except (ArithmeticError, AttributeError, FloatingPointError,
IOError, ImportError, IndexError, KeyError, IOError, ImportError, IndexError, KeyError,
OSError, OverflowError, TypeError, ValueError, OSError, OverflowError, TypeError, ValueError,
......
...@@ -88,12 +88,19 @@ class ZopeStarterTestCase(unittest.TestCase): ...@@ -88,12 +88,19 @@ class ZopeStarterTestCase(unittest.TestCase):
# XXX this almost certainly won't work on all systems # XXX this almost certainly won't work on all systems
import locale import locale
try: try:
conf = self.load_config_text("locale en_GB") try:
conf = self.load_config_text("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 = ZopeStarter(conf)
starter.setupLocale() starter.setupLocale()
self.assertEqual(locale.getlocale(), ['en_GB', 'ISO8859-1']) self.assertEqual(locale.getlocale(), ['en_GB', 'ISO8859-1'])
finally: finally:
# resest to system-defined locale # reset to system-defined locale
locale.setlocale(locale.LC_ALL, '') locale.setlocale(locale.LC_ALL, '')
def testSetupStartupHandler(self): def testSetupStartupHandler(self):
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment