Ejemplo n.º 1
0
    def getPlayableTrainers(self):
        """ Returns a list of the playable trainers """
        playableTrainers = []

        # tree = TrainerFactory.getTrainerdexTree()
        for trainerXML in self.tree.getiterator(Tags.trainerTag):
            if trainerXML.find(Tags.playableTag) != None:
                trainer = HumanTrainer()  # May want to use the dict up top
                self.buildTrainerFromXML(
                    trainer, trainerXML)  # Really slow for whatever reason
                playableTrainers.append(trainer)

        return playableTrainers
Ejemplo n.º 2
0
 def setUp(self):
     """ Build the Trainer and Pokemon lists for use in tests """
     self.trainer = HumanTrainer()