Mercurial > p > roundup > code
comparison test/test_dates.py @ 5792:db429c75caec
replace assertEquals with assertEqual.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Mon, 10 Jun 2019 21:20:14 -0400 |
| parents | 64c4e43fbb84 |
| children | d76291836523 |
comparison
equal
deleted
inserted
replaced
| 5791:9e165dc0fdda | 5792:db429c75caec |
|---|---|
| 86 ae(str(Date('2004-06')), '2004-06-01.00:00:00') | 86 ae(str(Date('2004-06')), '2004-06-01.00:00:00') |
| 87 ae(str(Date('1900-02-01')), '1900-02-01.00:00:00') | 87 ae(str(Date('1900-02-01')), '1900-02-01.00:00:00') |
| 88 ae(str(Date('1800-07-15')), '1800-07-15.00:00:00') | 88 ae(str(Date('1800-07-15')), '1800-07-15.00:00:00') |
| 89 | 89 |
| 90 def testLeapYear(self): | 90 def testLeapYear(self): |
| 91 self.assertEquals(str(Date('2008-02-29')), '2008-02-29.00:00:00') | 91 self.assertEqual(str(Date('2008-02-29')), '2008-02-29.00:00:00') |
| 92 | 92 |
| 93 def testDateError(self): | 93 def testDateError(self): |
| 94 self.assertRaises(ValueError, Date, "12") | 94 self.assertRaises(ValueError, Date, "12") |
| 95 # Date cannot handle dates before year 1 | 95 # Date cannot handle dates before year 1 |
| 96 self.assertRaises(ValueError, Date, (0, 1, 1, 0, 0, 0.0, 0, 1, -1)) | 96 self.assertRaises(ValueError, Date, (0, 1, 1, 0, 0, 0.0, 0, 1, -1)) |
