def test_simple_match_basetype_is_match_rule():

    grammar = """
    Rule: INT|'one'|ID;
    """
    meta = metamodel_from_str(grammar)
    assert meta
    assert meta['Rule']._tx_type is RULE_MATCH

    model = meta.model_from_str('34')
    assert model
    assert model.__class__ == int
    assert model == 34
Test that ordered choice of simple matches and base types
dataset/ETHPy150Open igordejanovic/textX/tests/functional/test_textx_language.py/test_simple_match_basetype_is_match_rule