Mercurial > p > roundup > code
diff test/test_dates.py @ 1268:b34adc9bcaf2
implemented the missing Interval.__add__
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Fri, 11 Oct 2002 01:25:40 +0000 |
| parents | 9b910e8d987d |
| children | 46a1951fdb14 |
line wrap: on
line diff
--- a/test/test_dates.py Thu Oct 10 11:21:51 2002 +0000 +++ b/test/test_dates.py Fri Oct 11 01:25:40 2002 +0000 @@ -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.13 2002-09-10 00:19:54 richard Exp $ +# $Id: test_dates.py,v 1.14 2002-10-11 01:25:40 richard Exp $ import unittest, time @@ -148,6 +148,15 @@ ae(str(Interval(' 14:00 ')), '+ 14:00') ae(str(Interval(' 0:04:33 ')), '+ 0:04:33') + # __add__ + # XXX these are fairly arbitrary and need fixing once the __add__ + # code handles the odd cases more correctly + ae(str(Interval('1y') + Interval('1y')), '+ 2y') + ae(str(Interval('1y') + Interval('1m')), '+ 1y 1m') + ae(str(Interval('1y') + Interval('2:40')), '+ 1y 2:40') + ae(str(Interval('1y') + Interval('- 1y')), '+') + ae(str(Interval('1y') + Interval('- 1m')), '+ 1y -1m') + def suite(): return unittest.makeSuite(DateTestCase, 'test')
