def setUp(self): """ Builds the ability and Pkmn for use in the tests """ self.battlePkmn = BuildPokemonBattleWrapper() self.status = Paralysis() self.status2 = Status() self.stat = "ATK" self.mod = 1.5 self.ability = StatModOnStatusAbility("", self.stat, self.mod)
class onStatus(unittest.TestCase): """ Test that onStatus operates correctly""" def setUp(self): """ Builds the ability and Pkmn for use in the tests """ self.battlePkmn = BuildPokemonBattleWrapper() self.status = Paralysis() self.status2 = Status() self.stat = "ATK" self.mod = 1.5 self.ability = StatModOnStatusAbility("", self.stat, self.mod) def statChange(self): """ Check that the stat is actually changed """ messages = self.ability.onStatus(self.battlePkmn, self.status) assert self.status.statMods[self.stat] == self.mod, "Stat Mod should be the modified stat." assert len(messages) == 1, "Messages should have one element"
class onStatus(unittest.TestCase): """ Test that onStatus operates correctly""" def setUp(self): """ Builds the ability and Pkmn for use in the tests """ self.battlePkmn = BuildPokemonBattleWrapper() self.status = Paralysis() self.status2 = Status() self.stat = "ATK" self.mod = 1.5 self.ability = StatModOnStatusAbility("", self.stat, self.mod) def statChange(self): """ Check that the stat is actually changed """ messages = self.ability.onStatus(self.battlePkmn, self.status) assert self.status.statMods[ self.stat] == self.mod, "Stat Mod should be the modified stat." assert len(messages) == 1, "Messages should have one element"