class resetTurns(unittest.TestCase): """ Test cases of resetTurns """ def setUp(self): """ Build the Delegate for the test """ self.min = 1 self.max = 10 self.delegate = MultiTurnRangeDelegate(self.min, self.max, None) def turnOn(self): """ Test that turnOn is reset """ self.delegate.turnOn = 1 self.delegate.resetTurns() assert self.delegate.turnOn == 0, "Turn On should be reset" def turns(self): """ Test that turns is reset to within the min and max """ self.delegate.resetTurns() assert self.delegate.turns in range( self.min, self.max + 1), "Turns should be between max and min"
class resetTurns(unittest.TestCase): """ Test cases of resetTurns """ def setUp(self): """ Build the Delegate for the test """ self.min = 1 self.max = 10 self.delegate = MultiTurnRangeDelegate(self.min, self.max, None) def turnOn(self): """ Test that turnOn is reset """ self.delegate.turnOn = 1 self.delegate.resetTurns() assert self.delegate.turnOn == 0, "Turn On should be reset" def turns(self): """ Test that turns is reset to within the min and max """ self.delegate.resetTurns() assert self.delegate.turns in range(self.min, self.max + 1), "Turns should be between max and min"
def setUp(self): """ Build the Effect for the test """ self.min = 1 self.max = 1 self.delegate = MultiTurnRangeDelegate(self.min, self.max, None)
def setUp(self): """ Build the Delegate for the test """ self.min = 1 self.max = 10 self.delegate = MultiTurnRangeDelegate(self.min, self.max, None)