class isCharging(unittest.TestCase): """ Test that isCharging returns the correct values """ def setUp(self): """ Grabs the message dictionary from StatModDelegate """ self.environment = BattleEnvironment() self.pkmn = BuildPokemonBattleWrapper() self.delegate = ChargeDelegate(2, 0, "") def isCharging(self): """ Tests if isCharging returns correctly when it is charging """ self.delegate.turnOn = 1 assert self.delegate.isCharging(self.pkmn, self.environment), "Should be charging" def isNotCharging(self): """ Tests if isCharging returns correctly when it is not charging """ self.delegate.turnOn = 0 assert not self.delegate.isCharging(self.pkmn, self.environment), "Should not be charging"
class isCharging(unittest.TestCase): """ Test that isCharging returns the correct values """ def setUp(self): """ Grabs the message dictionary from StatModDelegate """ self.environment = BattleEnvironment() self.pkmn = BuildPokemonBattleWrapper() self.delegate = ChargeDelegate(2, 0, "") def isCharging(self): """ Tests if isCharging returns correctly when it is charging """ self.delegate.turnOn = 1 assert self.delegate.isCharging(self.pkmn, self.environment), "Should be charging" def isNotCharging(self): """ Tests if isCharging returns correctly when it is not charging """ self.delegate.turnOn = 0 assert not self.delegate.isCharging( self.pkmn, self.environment), "Should not be charging"
def setUp(self): """ Grabs the message dictionary from StatModDelegate """ self.environment = BattleEnvironment() self.pkmn = BuildPokemonBattleWrapper() self.delegate = ChargeDelegate(2, 0, "")
def setUp(self): """ Grabs the message dictionary from StatModDelegate """ self.environment = BattleEnvironment() self.pkmn = BuildPokemonBattleWrapper() self.delegate = ChargeDelegate(2, 0, "")