Beispiel #1
0
 def testOverdraw(self):
     tis = TimeInSeconds("88")
     assert tis.subtractSeconds(100) == -12
     assert tis.inSeconds() == "0"
Beispiel #2
0
 def testAddSeconds(self):
     tis = TimeInSeconds("2:20")
     assert tis.addSeconds(20) == 160
     assert tis.inMinutesAndSeconds() == "2:40"
Beispiel #3
0
 def testSubtractSeconds(self):
     tis = TimeInSeconds("99")
     assert tis.subtractSeconds(50) == 49
     assert tis.inSeconds() == "49"
Beispiel #4
0
 def testInitInSeconds(self):
     tis = TimeInSeconds("59")
     assert tis.inSeconds() == "59"
     assert tis.inMinutesAndSeconds() == "0:59"
Beispiel #5
0
 def testInitInMinutesAndSeconds(self):
     tis = TimeInSeconds("3:25")
     assert tis.inSeconds() == "205"
     assert tis.inMinutesAndSeconds() == "3:25"
Beispiel #6
0
 def testOverdraw(self):
     tis = TimeInSeconds("88")
     assert tis.subtractSeconds(100) == -12
     assert tis.inSeconds() == "0"
Beispiel #7
0
 def testSubtractSeconds(self):
     tis = TimeInSeconds("99")
     assert tis.subtractSeconds(50) == 49
     assert tis.inSeconds() == "49"
Beispiel #8
0
 def testAddSeconds(self):
     tis = TimeInSeconds("2:20")
     assert tis.addSeconds(20) == 160
     assert tis.inMinutesAndSeconds() == "2:40"
Beispiel #9
0
 def testInitInMinutesAndSeconds(self):
     tis = TimeInSeconds("3:25")
     assert tis.inSeconds() == "205"
     assert tis.inMinutesAndSeconds() == "3:25"
Beispiel #10
0
 def testInitInSeconds(self):
     tis = TimeInSeconds("59")
     assert tis.inSeconds() == "59"
     assert tis.inMinutesAndSeconds() == "0:59"