def test___init__(self): instance = Map('Classic') self.assertEqual( instance.name, 'Classic', ) self.assertFalse(instance.loaded)
def setUpClass(cls): cls.map = Map('Classic') cls.map.load() cls.geography = Geography(name='Inland', map=cls.map, force='Army', orders=['Hold'])
def load(self): """ Loads the variant information from the JSON file with the name of the variant. """ with open(f'variants/{self.name}.json') as file: data = json_load(file) for key, value in data.items(): setattr(self, key, value) self.powers = make_instances(self.powers, Power) self.map = Map(self.map) self.map.load() self.loaded = True
def setUpClass(cls): cls.map = Map('Classic') cls.map.load()
def setUpClass(cls): cls.RPSmap = Map('RPS') cls.RPSmap.load() cls.ClassicMap = Map('Classic') cls.ClassicMap.load()
def setUpClass(cls): cls.map = Map('Classic') cls.map.load() cls.province = cls.map.provinces[34] cls.location = cls.map.locations[28] cls.geography = cls.location.geography