Mercurial > p > roundup > code
comparison test/test_dates.py @ 1873:f63aa57386b0
Backend improvements.
- using Zope3's test runner now, allowing GC checks, nicer controls and
coverage analysis
- all RDMBS backends now have indexes on several columns
- added testing of schema mutation, fixed rdbms backends handling of a
couple of cases
- !BETA! added postgresql backend, needs work !BETA!
| author | Richard Jones <richard@users.sourceforge.net> |
|---|---|
| date | Sat, 25 Oct 2003 22:53:26 +0000 |
| parents | cc96bf971b33 |
| children | dc55a195722d |
comparison
equal
deleted
inserted
replaced
| 1872:c085b4f4f0c0 | 1873:f63aa57386b0 |
|---|---|
| 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.24 2003-04-22 20:53:54 kedder Exp $ | 18 # $Id: test_dates.py,v 1.25 2003-10-25 22:53:26 richard Exp $ |
| 19 | 19 |
| 20 import unittest, time | 20 import unittest, time |
| 21 | 21 |
| 22 from roundup.date import Date, Interval, Range, fixTimeOverflow | 22 from roundup.date import Date, Interval, Range, fixTimeOverflow |
| 23 | 23 |
| 254 ae(str(Date('2003', add_granularity=1)), '2003-12-31.23:59:59') | 254 ae(str(Date('2003', add_granularity=1)), '2003-12-31.23:59:59') |
| 255 ae(str(Date('2003-5', add_granularity=1)), '2003-05-31.23:59:59') | 255 ae(str(Date('2003-5', add_granularity=1)), '2003-05-31.23:59:59') |
| 256 ae(str(Interval('+1w', add_granularity=1)), '+ 14d') | 256 ae(str(Interval('+1w', add_granularity=1)), '+ 14d') |
| 257 ae(str(Interval('-2m 3w', add_granularity=1)), '- 2m 14d') | 257 ae(str(Interval('-2m 3w', add_granularity=1)), '- 2m 14d') |
| 258 | 258 |
| 259 def suite(): | 259 def test_suite(): |
| 260 return unittest.makeSuite(DateTestCase, 'test') | 260 suite = unittest.TestSuite() |
| 261 | 261 suite.addTest(unittest.makeSuite(DateTestCase)) |
| 262 return suite | |
| 263 | |
| 264 if __name__ == '__main__': | |
| 265 runner = unittest.TextTestRunner() | |
| 266 unittest.main(testRunner=runner) | |
| 262 | 267 |
| 263 # vim: set filetype=python ts=4 sw=4 et si | 268 # vim: set filetype=python ts=4 sw=4 et si |
