Mercurial > p > roundup > code
comparison test/test_dates.py @ 5037:364c54991861
Remove unneeded TestSuite code from tests
The TestSuite code is no longer needed now that we are using py.test
which can automatically discover tests
| author | John Kristensen <john@jerrykan.com> |
|---|---|
| date | Fri, 21 Aug 2015 13:08:02 +1000 |
| parents | 380d8d8b30a3 |
| children | c977f3530944 |
comparison
equal
deleted
inserted
replaced
| 5036:380d8d8b30a3 | 5037:364c54991861 |
|---|---|
| 506 r = Range('2006-%02d'%i, Date) | 506 r = Range('2006-%02d'%i, Date) |
| 507 ae(str(r.from_value), '2006-%02d-01.00:00:00'%i) | 507 ae(str(r.from_value), '2006-%02d-01.00:00:00'%i) |
| 508 ae(str(r.to_value), '2006-%02d-%02d.23:59:59'%(i, | 508 ae(str(r.to_value), '2006-%02d-%02d.23:59:59'%(i, |
| 509 calendar.mdays[i])) | 509 calendar.mdays[i])) |
| 510 | 510 |
| 511 | |
| 512 def test_suite(): | |
| 513 suite = unittest.TestSuite() | |
| 514 suite.addTest(unittest.makeSuite(DateTestCase)) | |
| 515 suite.addTest(unittest.makeSuite(RangeTestCase)) | |
| 516 try: | |
| 517 import pytz | |
| 518 except ImportError: | |
| 519 pass | |
| 520 else: | |
| 521 suite.addTest(unittest.makeSuite(TimezoneTestCase)) | |
| 522 return suite | |
| 523 | |
| 524 if __name__ == '__main__': | |
| 525 runner = unittest.TextTestRunner() | |
| 526 unittest.main(testRunner=runner) | |
| 527 | |
| 528 # vim: set filetype=python sts=4 sw=4 et si : | 511 # vim: set filetype=python sts=4 sw=4 et si : |
