comparison test/test_dates.py @ 3460:c75dd71a7963 maint-0.8

merge from HEAD
author Richard Jones <richard@users.sourceforge.net>
date Fri, 13 Jan 2006 01:29:48 +0000
parents e330f751828e
children
comparison
equal deleted inserted replaced
3451:f18c0245a170 3460:c75dd71a7963
13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS 13 # BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS" 14 # FOR A PARTICULAR PURPOSE. THE CODE PROVIDED HEREUNDER IS ON AN "AS IS"
15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE, 15 # BASIS, AND THERE IS NO OBLIGATION WHATSOEVER TO PROVIDE MAINTENANCE,
16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS. 16 # SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.
17 # 17 #
18 # $Id: test_dates.py,v 1.35.2.1 2005-02-25 17:24:53 a1s Exp $ 18 # $Id: test_dates.py,v 1.35.2.2 2006-01-13 01:29:48 richard Exp $
19 from __future__ import nested_scopes 19 from __future__ import nested_scopes
20 20
21 import unittest, time 21 import unittest, time
22 22
23 from roundup.date import Date, Interval, Range, fixTimeOverflow 23 from roundup.date import Date, Interval, Range, fixTimeOverflow
62 62
63 def testDateError(self): 63 def testDateError(self):
64 self.assertRaises(ValueError, Date, "12") 64 self.assertRaises(ValueError, Date, "12")
65 # Date cannot handle dates before UNIX epoch 65 # Date cannot handle dates before UNIX epoch
66 self.assertRaises(ValueError, Date, (1, 1, 1, 0, 0, 0.0, 0, 1, -1)) 66 self.assertRaises(ValueError, Date, (1, 1, 1, 0, 0, 0.0, 0, 1, -1))
67 self.assertRaises(ValueError, Date, "1/1/06")
67 68
68 def testOffset(self): 69 def testOffset(self):
69 ae = self.assertEqual 70 ae = self.assertEqual
70 date = Date("2000-04-17", -5) 71 date = Date("2000-04-17", -5)
71 ae(str(date), '2000-04-17.05:00:00') 72 ae(str(date), '2000-04-17.05:00:00')

Roundup Issue Tracker: http://roundup-tracker.org/