summaryrefslogtreecommitdiff
path: root/src/zope/i18n/tests/test_formats.py
diff options
context:
space:
mode:
authorStephan Richter <stephan.richter@gmail.com>2008-07-10 05:57:18 +0000
committerStephan Richter <stephan.richter@gmail.com>2008-07-10 05:57:18 +0000
commit1174f54e98d277db27fcd9bfb91ab2dbd010bbf3 (patch)
tree4f1cdef46d2c35ae72fe694bad5d6c16d081d32a /src/zope/i18n/tests/test_formats.py
parentfa2229cca119788208ef87b1f3fdaa1c0e1573e2 (diff)
downloadzope-i18n-1174f54e98d277db27fcd9bfb91ab2dbd010bbf3.tar.gz
Bug: When parsing a date, the parsing pattern did not ensure that the line
started and ended with the matching pattern, so that '1/1/2007' parsed into '1/1/20' for example.
Diffstat (limited to 'src/zope/i18n/tests/test_formats.py')
-rw-r--r--src/zope/i18n/tests/test_formats.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/zope/i18n/tests/test_formats.py b/src/zope/i18n/tests/test_formats.py
index e7b425a..f1a13c5 100644
--- a/src/zope/i18n/tests/test_formats.py
+++ b/src/zope/i18n/tests/test_formats.py
@@ -346,6 +346,10 @@ class TestDateTimeFormat(TestCase):
def testDateTimeParseError(self):
self.assertRaises(DateTimeParseError,
self.format.parse, '02.01.03 21:48', 'dd.MM.yyyy HH:mm')
+ self.assertRaises(DateTimeParseError,
+ self.format.parse, '02.01.2003', 'dd.MM.yy')
+ self.assertRaises(DateTimeParseError,
+ self.format.parse, 'ff02.01.03', 'dd.MM.yy')
def testParse12PM(self):
self.assertEqual(