class getHeader(unittest.TestCase): """ Test cases of getHeader """ def setUp(self): """ Build the Trainer and Pokemon lists for use in tests """ self.trainer = HumanTrainer() def headerIsHumanHeader(self): """ Check that the attack returned by getAction is an attack the Pokemon has """ assert self.trainer.getHeader() is HumanTrainer.header, "Should be an empty string"
class getHeader(unittest.TestCase): """ Test cases of getHeader """ def setUp(self): """ Build the Trainer and Pokemon lists for use in tests """ self.trainer = HumanTrainer() def headerIsHumanHeader(self): """ Check that the attack returned by getAction is an attack the Pokemon has """ assert self.trainer.getHeader( ) is HumanTrainer.header, "Should be an empty string"
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
def setUp(self): """ Build the Trainer and Pokemon lists for use in tests """ self.trainer = HumanTrainer()