Esempio n. 1
0
 def test_negative(self):
     duration = datetime.timedelta(days=-1, hours=1, minutes=3, seconds=5)
     self.assertEqual(parse_duration(duration_string(duration)), duration)
Esempio n. 2
0
 def test_microseconds(self):
     duration = datetime.timedelta(hours=1,
                                   minutes=3,
                                   seconds=5,
                                   microseconds=12345)
     self.assertEqual(parse_duration(duration_string(duration)), duration)
Esempio n. 3
0
 def test_microseconds(self):
     duration = datetime.timedelta(hours=1,
                                   minutes=3,
                                   seconds=5,
                                   microseconds=12345)
     self.assertEqual(duration_string(duration), '01:03:05.012345')
Esempio n. 4
0
 def test_negative(self):
     duration = datetime.timedelta(days=-1, hours=1, minutes=3, seconds=5)
     self.assertEqual(duration_string(duration), '-1 01:03:05')
Esempio n. 5
0
 def test_simple(self):
     duration = datetime.timedelta(hours=1, minutes=3, seconds=5)
     self.assertEqual(duration_string(duration), '01:03:05')