Mercurial > p > roundup > code
comparison test/test_dates.py @ 2982:22f16d0646ce
oops! error in recently added test
| author | Alexander Smishlajev <a1s@users.sourceforge.net> |
|---|---|
| date | Mon, 29 Nov 2004 14:34:10 +0000 |
| parents | e28f047f87fa |
| children | d4d58c36d0bf e330f751828e |
comparison
equal
deleted
inserted
replaced
| 2981:ad04cb95e2b0 | 2982:22f16d0646ce |
|---|---|
| 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.34 2004-11-29 14:30:55 a1s Exp $ | 18 # $Id: test_dates.py,v 1.35 2004-11-29 14:34:10 a1s 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 |
| 168 ae(str(Interval('1m 25d')), '+ 1m 25d') | 168 ae(str(Interval('1m 25d')), '+ 1m 25d') |
| 169 ae(str(Interval('-2w 3 d ')), '- 17d') | 169 ae(str(Interval('-2w 3 d ')), '- 17d') |
| 170 ae(str(Interval(' - 1 d 2:50 ')), '- 1d 2:50') | 170 ae(str(Interval(' - 1 d 2:50 ')), '- 1d 2:50') |
| 171 ae(str(Interval(' 14:00 ')), '+ 14:00') | 171 ae(str(Interval(' 14:00 ')), '+ 14:00') |
| 172 ae(str(Interval(' 0:04:33 ')), '+ 0:04:33') | 172 ae(str(Interval(' 0:04:33 ')), '+ 0:04:33') |
| 173 ae(str(Interval(8.*3600)), '+ 08:00') | 173 ae(str(Interval(8.*3600)), '+ 8:00') |
| 174 | 174 |
| 175 def testIntervalInitDate(self): | 175 def testIntervalInitDate(self): |
| 176 ae = self.assertEqual | 176 ae = self.assertEqual |
| 177 now = Date('.') | 177 now = Date('.') |
| 178 now.hour = now.minute = now.second = 0 | 178 now.hour = now.minute = now.second = 0 |
