def test_match_rule():

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

    model = meta.model_from_str('two')
    assert model
    assert model.__class__ == text
    assert model == "two"
Match rule always returns string.
dataset/ETHPy150Open igordejanovic/textX/tests/functional/test_textx_language.py/test_match_rule