def test_fromfile(self, filename='examples/gewaesser.cxt'): d = Definition.fromfile(filename) self.assertEqual(d, (('Fluss', 'Bach', 'Kanal', 'Graben', 'See', 'Tuempel', 'Teich', 'Becken'), ('fliessend', 'stehend', 'natuerlich', 'kuenstlich', 'gross', 'klein'), [(True, False, True, False, True, False), (True, False, True, False, False, True), (True, False, False, True, True, False), (True, False, False, True, False, True), (False, True, True, False, True, False), (False, True, True, False, False, True), (False, True, False, True, True, False), (False, True, False, True, False, True)]))
def test_fromfile(filename='examples/gewaesser.cxt'): objects = ('Fluss', 'Bach', 'Kanal', 'Graben', 'See', 'Tuempel', 'Teich', 'Becken') properties = ('fliessend', 'stehend', 'natuerlich', 'kuenstlich', 'gross', 'klein') bools = [(True, False, True, False, True, False), (True, False, True, False, False, True), (True, False, False, True, True, False), (True, False, False, True, False, True), (False, True, True, False, True, False), (False, True, True, False, False, True), (False, True, False, True, True, False), (False, True, False, True, False, True)] assert Definition.fromfile(filename) == (objects, properties, bools)