Exemple #1
0
 def test_parse_time_expression_metric(self):
     self.assertEquals(storage.time_expression_to_milliseconds("10h"),
                       10 * 3600 * 1000)
     self.assertEquals(storage.time_expression_to_milliseconds("5m"),
                       5 * 60 * 1000)
     self.assertEquals(storage.time_expression_to_milliseconds("3000s"),
                       3000 * 1000)
     self.assertEquals(storage.time_expression_to_milliseconds("5000ms"),
                       5000)
Exemple #2
0
 def test_parse_time_expression_metric(self):
     self.assertEquals(storage.time_expression_to_milliseconds("10h"), 10 * 3600 * 1000)
     self.assertEquals(storage.time_expression_to_milliseconds("5m"), 5 * 60 * 1000)
     self.assertEquals(storage.time_expression_to_milliseconds("3000s"),  3000 * 1000)
     self.assertEquals(storage.time_expression_to_milliseconds("5000ms"), 5000)
Exemple #3
0
 def test_parse_time_expression_clock_time(self):
     milliseconds  = (((3 * 3600 ) + (20 * 60 ) + (40 )) * 1000 )  
     self.assertEquals(storage.time_expression_to_milliseconds("03:20:40"), milliseconds)
Exemple #4
0
 def test_time_expression_to_milliseconds_clock_time_fraction(self):
     milliseconds  = (((3 * 3600 ) + (20 * 60 ) + (40 )) * 1000 )  + 200
     self.assertEquals(storage.time_expression_to_milliseconds("03:20:40.200"), milliseconds)
Exemple #5
0
 def _convert_to_24fps(self, time_str):
     ms = time_expression_to_milliseconds(time_str)
     fps_24 = ms/1.001001001
     return milliseconds_to_time_clock_exp(fps_24)
Exemple #6
0
 def test_parse_time_expression_clock_time(self):
     milliseconds = (((3 * 3600) + (20 * 60) + (40)) * 1000)
     self.assertEquals(storage.time_expression_to_milliseconds("03:20:40"),
                       milliseconds)
Exemple #7
0
 def test_time_expression_to_milliseconds_clock_time_fraction(self):
     milliseconds = (((3 * 3600) + (20 * 60) + (40)) * 1000) + 200
     self.assertEquals(
         storage.time_expression_to_milliseconds("03:20:40.200"),
         milliseconds)