Пример #1
0
 def test_format_seconds_with_minute_and_second(self):
     self.assertEqual(format_seconds(61), "1 minute(s) and 1.00 seconds")
Пример #2
0
 def test_format_seconds_with_minute(self):
     self.assertEqual(format_seconds(60), "1 minute(s) and 0.00 seconds")
Пример #3
0
 def test_format_seconds_with_long_part_of_second(self):
     self.assertEqual(format_seconds(0.23456789), "0.23 seconds")
Пример #4
0
 def test_format_seconds_with_zero(self):
     self.assertEqual(format_seconds(0), "0.00 seconds")
Пример #5
0
 def test_format_seconds_with_hours(self):
     self.assertEqual(format_seconds(14135),
                      "3 hour(s) 55 minute(s) and 35.00 seconds")
Пример #6
0
 def test_format_seconds_with_hour(self):
     self.assertEqual(format_seconds(4135),
                      "1 hour(s) 8 minute(s) and 55.00 seconds")