def testDateTimesWithNoZeroesDoNotMatch(self): testdatestring = "20041218" prepareddatestring = exercises.preparedateinsert(self.datewithnozeroes) self.assertNotEqual(prepareddatestring, testdatestring)
def testDateComparison(self): first_date = exercises.preparedateinsert(datetime.date(2004, 9, 8)) second_date = exercises.preparedateinsert(datetime.date(2004, 10, 8)) earliest_date = min(first_date, second_date) latest_date = max(first_date, second_date) self.assertTrue(first_date == earliest_date and second_date == latest_date)
def testDateTimesWithZeroesMatch(self): testdatestring = "20130301" prepareddatestring = exercises.preparedateinsert(self.datewithzeroes) self.assertEqual(prepareddatestring, testdatestring)