コード例 #1
0
class removePreviousHeal(unittest.TestCase):
    """ Test that removePreviousHeal actually removes previous heal effect """
    def setUp(self):
        """ Builds the delegate and pkmn for use in the tests """
        self.pkmn = BuildPokemonBattleWrapper()
        self.delegate = PeriodicHealDelegate("", "")
        self.heal = PeriodicHeal("")

    def removesPeriodicHeal(self):
        """ Tests if removePreviousHeal actually removes the heal """
        self.pkmn.secondaryEffects = [self.heal]
        self.delegate.removePreviousHeal(self.pkmn)

        assert not self.heal in self.pkmn.secondaryEffects, "Should not have the original periodic heal effect"
コード例 #2
0
class removePreviousHeal(unittest.TestCase):
    """ Test that removePreviousHeal actually removes previous heal effect """
    
    def setUp(self):
        """ Builds the delegate and pkmn for use in the tests """
        self.pkmn  =  BuildPokemonBattleWrapper()
        self.delegate = PeriodicHealDelegate("", "")
        self.heal = PeriodicHeal("")
        
    def removesPeriodicHeal(self):
        """ Tests if removePreviousHeal actually removes the heal """
        self.pkmn.secondaryEffects = [self.heal]
        self.delegate.removePreviousHeal(self.pkmn)
        
        assert not self.heal in self.pkmn.secondaryEffects, "Should not have the original periodic heal effect"