Code

fixed detection of bad date specs (sf bug 691439)
[roundup.git] / test / test_dates.py
index fc0c9bdfc0988f3ee6e4e02f49a70267ce22e4d4..44f3f1023d7384b973346ae27df2b2abba79704f 100644 (file)
@@ -15,7 +15,7 @@
 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
 # 
-# $Id: test_dates.py,v 1.20 2003-03-10 00:22:21 richard Exp $ 
+# $Id: test_dates.py,v 1.21 2003-03-19 03:25:30 richard Exp $ 
 
 import unittest, time
 
@@ -53,6 +53,9 @@ class DateTestCase(unittest.TestCase):
         date = Date("8:47:11")
         ae(str(date), '%s-%02d-%02d.08:47:11'%(y, m, d))
 
+    def testDateError(self):
+        self.assertRaises(ValueError, Date, "12")
+
     def testOffset(self):
         ae = self.assertEqual
         date = Date("2000-04-17", -5)