def test_sixty_one_seconds_as_float_is_formatted_correctly(self): self.assertEqual(format_runtime(61.0), '1m 1s')
def test_sixty_seconds_is_formatted_correctly(self): self.assertEqual(format_runtime(60), '1m 0s')
def test_very_small_runtime_is_formatted_correctly(self): self.assertEqual(format_runtime(0.001), '0.00s')
def test_half_second_is_formatted_correctly(self): self.assertEqual(format_runtime(0.5), '0.50s')
def test_zero_seconds_is_formatted_correctly(self): self.assertEqual(format_runtime(0), '0.00s')