summaryrefslogtreecommitdiff
path: root/src/zope
diff options
context:
space:
mode:
authorJason Madden <jamadden@gmail.com>2017-12-17 11:54:38 -0600
committerJason Madden <jamadden@gmail.com>2017-12-17 11:54:38 -0600
commita455b5485dee424f8e96b51c33fae4f41ba08470 (patch)
treeea49f8d2e8cb897e859820798830d571eb16b3c8 /src/zope
parente00031bdd9a9ee2f12d7fa687713a36d5e35d02f (diff)
downloadzope-i18n-a455b5485dee424f8e96b51c33fae4f41ba08470.tar.gz
Fix test on PyPy since it uses a less precise error message for the TypeError.
Diffstat (limited to 'src/zope')
-rw-r--r--src/zope/i18n/tests/test_formats.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/zope/i18n/tests/test_formats.py b/src/zope/i18n/tests/test_formats.py
index a57b4fb..3865244 100644
--- a/src/zope/i18n/tests/test_formats.py
+++ b/src/zope/i18n/tests/test_formats.py
@@ -424,8 +424,10 @@ class TestDateTimeFormat(_TestCase):
# XXX: Bug: This raises
# TypeError: unsupported operand type(s) for +: 'datetime.time' and 'datetime.timedelta'
# at pytz/tzinfo.py:309
+ # (PyPy and CPython produce slightly different error messages;
+ # PyPy doesn't include the modulename)
tzinfo = pytz.timezone("US/Central")
- with self.assertRaisesRegex(TypeError, 'datetime.timedelta'):
+ with self.assertRaisesRegex(TypeError, 'timedelta'):
self.format.parse(
'21:48:01 US/Central',
'HH:mm:ss zzzz')