コード例 #1
0
ファイル: hail_test.py プロジェクト: cloew/Pokemon-Project
class immune(unittest.TestCase):
    """ Test cases of immune """
    
    def  setUp(self):
        """ Build the *** for the test """
        self.weather = Hail()
        self.pkmn = BuildPokemonBattleWrapper()
        
    def immune(self):
        """ Test that an Ice-type Pokemon is immune """
        self.pkmn.setTypes(["ICE"])
        assert self.weather.immune(self.pkmn), "Ice-type pokemon should be immune"
        
    def notImmune(self):
        """ Test that a non-Ice-type Pokemon is not immune """
        self.pkmn.setTypes(["GRASS"])
        assert not self.weather.immune(self.pkmn), "Non-Ice-type pokemon should not be immune"
コード例 #2
0
ファイル: hail_test.py プロジェクト: TimChau/Pokemon-Project
class immune(unittest.TestCase):
    """ Test cases of immune """
    def setUp(self):
        """ Build the *** for the test """
        self.weather = Hail()
        self.pkmn = BuildPokemonBattleWrapper()

    def immune(self):
        """ Test that an Ice-type Pokemon is immune """
        self.pkmn.setTypes(["ICE"])
        assert self.weather.immune(
            self.pkmn), "Ice-type pokemon should be immune"

    def notImmune(self):
        """ Test that a non-Ice-type Pokemon is not immune """
        self.pkmn.setTypes(["GRASS"])
        assert not self.weather.immune(
            self.pkmn), "Non-Ice-type pokemon should not be immune"
コード例 #3
0
ファイル: hail_test.py プロジェクト: cloew/Pokemon-Project
 def  setUp(self):
     """ Build the *** for the test """
     self.weather = Hail()
     self.pkmn = BuildPokemonBattleWrapper()
コード例 #4
0
ファイル: hail_test.py プロジェクト: TimChau/Pokemon-Project
 def setUp(self):
     """ Build the *** for the test """
     self.weather = Hail()
     self.pkmn = BuildPokemonBattleWrapper()