Пример #1
0
class cantHandle(unittest.TestCase):
    """ Test cases of cantHandle """

    def setUp(self):
        """ Build the FaintDelegate for the test """
        self.handler = TargetFaintDelegate()
        self.target = BuildPokemonBattleWrapper()

    def targetFainted(self):
        """ Test that it can't handle the target fainting """
        self.target.faint()
        cantHandle = self.handler.cantHandle(target=self.target)
        assert cantHandle, "Shouldn't handle when the target is fainted"

    def targetNotFainted(self):
        """ Test that it can handle when the target is not fainted """
        cantHandle = self.handler.cantHandle(target=self.target)
        assert not cantHandle, "Should handle when the target is not fainted"
Пример #2
0
class cantHandle(unittest.TestCase):
    """ Test cases of cantHandle """
    
    def  setUp(self):
        """ Build the FaintDelegate for the test """
        self.handler = TargetFaintDelegate()
        self.target = BuildPokemonBattleWrapper()
        
    def targetFainted(self):
        """ Test that it can't handle the target fainting """
        self.target.faint()
        cantHandle = self.handler.cantHandle(target = self.target)
        assert cantHandle, "Shouldn't handle when the target is fainted"
        
    def targetNotFainted(self):
        """ Test that it can handle when the target is not fainted """
        cantHandle = self.handler.cantHandle(target = self.target)
        assert not cantHandle, "Should handle when the target is not fainted"
Пример #3
0
 def setUp(self):
     """ Build the FaintDelegate for the test """
     self.handler = TargetFaintDelegate()
     self.target = BuildPokemonBattleWrapper()
Пример #4
0
 def  setUp(self):
     """ Build the FaintDelegate for the test """
     self.handler = TargetFaintDelegate()
     self.target = BuildPokemonBattleWrapper()