コード例 #1
0
    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)
コード例 #2
0
 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)
コード例 #3
0
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"
コード例 #4
0
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"