def test___init6b__(self): wd = WeaponsDict("../Data/Weapons.csv") wg = WeaponGrouping("1-6|[0-2|A,B][0-3|C,D][0-5|E,F]".lower(), wd) self.assertIsInstance(wg, WeaponGrouping) perm = wg.permutations() self.assertIsInstance(perm, list) sg = perm[0].slotsGebruikt() self.assertEqual(sg, 1)
def test___init3c__(self): wd = WeaponsDict("../Data/Weapons.csv") wg = WeaponGrouping("0-6|A,B,C".lower(), wd) self.assertIsInstance(wg, WeaponGrouping) perm = wg.permutations() self.assertIsInstance(perm, list) sg = perm[0].slotsGebruikt() self.assertEqual(sg, 6)
def __init__(self, unitMogelijkhedenFile="", weaponsFile=""): wd = WeaponsDict(weaponsFile) with open(unitMogelijkhedenFile, 'r') as file: print(file.readline()) rows = file.read().splitlines() for row in rows: print(row) unitMogelijkheden = ModelMogelijkheden(row, wd) self.append(unitMogelijkheden) print("units regels gelezen: ", len(rows)) print("units in dict: ", len(self))
def test___init1__(self): wd = WeaponsDict("../Data/Weapons.csv") self.assertIsInstance(wd, WeaponsDict)
def test___init1__(self): wd = WeaponsDict("../Data/Weapons.csv") w = wd['a'] self.assertEqual('a', w.name)
def test___init1__(self): wd = WeaponsDict("../Data/Weapons.csv") um = ModelMogelijkheden("1;c1;unit1;5;3;3;4;4;4;1;10;4;3;1|A", wd) self.assertIsInstance(um, ModelMogelijkheden)
def test___init5__(self): wd = WeaponsDict("../Data/Weapons.csv") um = ModelMogelijkheden( "1;c2;unit5;5;3;3;4;4;4;1;10;4;3;1-6|[0-3|A,B][0-3|C,D][0-3|E,F]", wd) self.assertIsInstance(um, ModelMogelijkheden)
def test___init4__(self): wd = WeaponsDict("../Data/Weapons.csv") um = ModelMogelijkheden( "1;c2;unit4;5;3;3;4;4;4;1;10;4;6;1-6|A,B[0-4|C,[0-4|E,F][0-4|D]]", wd) self.assertIsInstance(um, ModelMogelijkheden)