Ejemplo n.º 1
0
class getHeal(unittest.TestCase):
    """ Test that getHeal returns the right amount to heal """
    def setUp(self):
        """ Builds the heal """
        self.pkmn = BuildPokemonBattleWrapper()
        self.heal = PeriodicHeal("")
        self.hp = 32

    def heal(self):
        """ Test the heal returns the proper ratio """
        self.pkmn.setStat("HP", self.hp)
        heal = self.heal.getHeal(self.pkmn)
        assert heal == self.hp / PeriodicHeal.ratio, "Heal should be a sixteenth of the targets health"
Ejemplo n.º 2
0
class getHeal(unittest.TestCase):
    """ Test that getHeal returns the right amount to heal """
    
    def setUp(self):
        """ Builds the heal """
        self.pkmn = BuildPokemonBattleWrapper()
        self.heal = PeriodicHeal("")
        self.hp = 32
    
    def heal(self):
        """ Test the heal returns the proper ratio """
        self.pkmn.setStat("HP", self.hp)
        heal = self.heal.getHeal(self.pkmn)
        assert heal == self.hp/PeriodicHeal.ratio, "Heal should be a sixteenth of the targets health"