def test_multiple_imports():
    """
    Test that rules grammars imported from multiple places
    results in the same meta-class objects.
    """

    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 = """
        first 1 2
        third "one" "two"
    """

    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