예제 #1
0
 def interval(self, section: str, fallback='') -> int:
     age = self.parser.get(section, INTERVAL, fallback=fallback)
     return parse_hr_time(age)
예제 #2
0
 def test_parse_time_h(self):
     self.assertEqual(48 * 60, parse_hr_time('48h'))
예제 #3
0
 def test_parse_time_bad(self):
     self.assertTrue(parse_hr_time('321') < 0)
예제 #4
0
 def test_parse_time_d(self):
     self.assertEqual(24 * 60 * 3, parse_hr_time('3d'))
예제 #5
0
 def test_parse_time(self):
     self.assertEqual(123, parse_hr_time('123m'))