def test_advance_minute_negative(self): """Negative value test that should raise a ValueError""" clock = Clock() try: clock.advance_minute(-1) self.assertEqual( True, False, "exception not thrown for advance minute value of -1") except ValueError as value_error: self.assertEqual(True, True)
def test_advance_minute_rollover(self): """Test advance of minute and hour due to rollover""" clock = Clock() clock.advance_minute(121) # you can change to 00 for your tests if you would like! self.assertEqual("2:1:0", clock.__str__())
def test_advance_minute_no_rollover(self): """Basic advance that will not roll over the minute or subsequently the hour""" clock = Clock() clock.advance_minute(59) # you can change to 00 for your tests if you would like! self.assertEqual("0:59:0", clock.__str__())