Beispiel #1
0
 def test_little_endian(self):
     bb = BestBefore('30/09/2001')
     self.assertEqual('2001-09-30', bb.compute())
Beispiel #2
0
 def test_guess_whole_year_number(self):
     bb = BestBefore('09/30/2000')
     self.assertEqual('2000-09-30', bb.compute())
Beispiel #3
0
 def test_little_and_medium(self):
     bb = BestBefore('01/02/2001')
     self.assertEqual('2001-01-02', bb.compute())
Beispiel #4
0
 def test_illegal_date(self):
     bb = BestBefore('31/9/1973')
     self.assertEqual('31/9/1973 is illegal', bb.compute())
Beispiel #5
0
 def test_medium_endian(self):
     bb = BestBefore('09/30/2001')
     self.assertEqual('2001-09-30', bb.compute())