def test_get_exceeded_time_returns_correct_value(self, time_mock): meter = MeasurePerformance(self.filename) time_mock.time.return_value = 2 meter.start = time_mock.time.return_value - 1 self.assertEqual(meter.get_exceeded_time(), 1)
def test_get_exceeded_time_returns_correct_value(self): meter = MeasurePerformance(self.filename) meter.start = time.time() - 1 self.assertEqual(meter.get_exceeded_time(), 1)