示例#1
0
 def testDateTimesWithNoZeroesDoNotMatch(self):
     testdatestring = "20041218"
     prepareddatestring = exercises.preparedateinsert(self.datewithnozeroes)
     self.assertNotEqual(prepareddatestring, testdatestring)
示例#2
0
 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)
示例#3
0
 def testDateTimesWithZeroesMatch(self):
     testdatestring = "20130301"
     prepareddatestring = exercises.preparedateinsert(self.datewithzeroes)
     self.assertEqual(prepareddatestring, testdatestring)