

def test_multiple_imports():
    '\n    Test that rules grammars imported from multiple places\n    results in the same meta-class objects.\n    '
    current_dir = os.path.dirname(__file__)
    mm = metamodel_from_file(os.path.join(current_dir, 'multiple', 'first.tx'))
    print(mm['First']._tx_attrs)
    print(mm['First']._tx_attrs['first'].cls._tx_attrs['second'].cls.__name__)
    print(mm['Third'])
    print(type(mm['First']._tx_attrs['first']))
    assert (mm['First']._tx_attrs['first'].cls._tx_attrs['second'].cls is mm['relative.third.Third'])
    metamodel_export(mm, 'multipleimport_test_mm.dot')
    model = '\n        first 1 2\n        third "one" "two"\n    '
    model = mm.model_from_str(model)
    model_export(model, 'multipleimport_test_model.dot')

dataset/ETHPy150Open igordejanovic/textX/tests/functional/test_import/test_import.py test_multiple_imports/original