Пример #1
0
 def test_1(self):
     t = PrettyDuration(180)
     assert str(t) == '3:00 minutes'
Пример #2
0
 def test_2(self):
     t = PrettyDuration(179.999999)
     assert str(t) == '3:00 minutes'
Пример #3
0
 def test_16(self):
     assert str(PrettyDuration(0.027)) == "27.0 milliseconds"
Пример #4
0
 def test_3(self):
     t = PrettyDuration(5.99999)
     assert str(t) == '6 seconds'
Пример #5
0
 def test_13(self):
     assert str(PrettyDuration(18.4)) == "18.4 seconds"
Пример #6
0
 def test_15(self):
     assert str(PrettyDuration(.340)) == "340.0 milliseconds"
Пример #7
0
 def test_12(self):
     assert str(PrettyDuration(2580)) == "43:00 minutes"
Пример #8
0
 def test_11(self):
     assert str(PrettyDuration(2586.3)) == "43:06:300 minutes"
Пример #9
0
 def test_10(self):
     """make sure that PrettyTimePrint prints correctly"""
     assert str(PrettyDuration(3.0)) == "3 seconds"
Пример #10
0
 def test_7(self):
     """make sure that PrettyTimePrint prints correctly"""
     assert str(PrettyDuration(4393)) == "1:13:13 hours"
Пример #11
0
 def test_5(self):
     """make sure that PrettyTimePrint prints correctly"""
     assert str(PrettyDuration(62.03)) == '1:02:030 minutes'