Example #1
0
 def it_should_parse_short_time_without_separators(self):
     result = parse_time("1647")
     today = datetime.date.today()
     self.assertEqual(result, datetime.datetime(today.year, today.month, today.day, 16, 47, 0))
Example #2
0
 def it_should_parse_full_time(self):
     result = parse_time("16:47:21")
     today = datetime.date.today()
     self.assertEqual(result, datetime.datetime(today.year, today.month, today.day, 16, 47, 21))
Example #3
0
 def it_should_parse_short_time_without_separators(self):
     result = parse_time('1647')
     today = datetime.date.today()
     self.assertEqual(
         result,
         datetime.datetime(today.year, today.month, today.day, 16, 47, 0))
Example #4
0
 def it_should_parse_full_time(self):
     result = parse_time('16:47:21')
     today = datetime.date.today()
     self.assertEqual(
         result,
         datetime.datetime(today.year, today.month, today.day, 16, 47, 21))
Example #5
0
 def it_should_parse_short_time(self):
     result = parse_time('16:47')
     today = datetime.date.today()
     self.assertEqual(
         result,
         datetime.datetime(today.year, today.month, today.day, 16, 47, 0))
Example #6
0
 def it_should_parse_full_time_without_separators(self):
     result = parse_time('164721')
     today = datetime.date.today()
     self.assertEqual(
         result,
         datetime.datetime(today.year, today.month, today.day, 16, 47, 21))