Beispiel #1
0
def test_time_estimate(patch_datetime_now):
    tef = TimeEstimateFormatter(100)
    assert tef.start_str == '1970-01-01 12:00:00'
    assert tef.finish_str == '1970-01-01 12:01:40'
    assert tef.delta_str == '0:01:40'
Beispiel #2
0
 def get_overall_time_estimate_formatter(self, results):
     return TimeEstimateFormatter(
         self.get_estimated_overall_duration(results))
Beispiel #3
0
def test_time_estimate_none(patch_datetime_now):
    tef = TimeEstimateFormatter(None)
    assert tef.start_str == '1970-01-01 12:00:00'
    assert tef.finish_str == UNKNOWN_ABS_TIME
    assert tef.delta_str == UNKNOWN_TIME_DELTA
Beispiel #4
0
 def get_exec_estimate_time_formatter(self, key, results):
     return TimeEstimateFormatter(
         self.get_estimated_exec_duration(key, results))