def test_regex_match_rule():

    grammar = """
    Rule: 'one'|/bar.?/|'three';
    """
    meta = metamodel_from_str(grammar)
    assert meta
    assert meta['Rule']._tx_type is RULE_MATCH
    assert set([x.__name__ for x in meta]) == set(['Rule'])\
        .union(set(BASE_TYPE_NAMES))

    model = meta.model_from_str('bar7')
    assert model
    assert model.__class__ == text
    assert model == "bar7"
Get the value for this view as a bytestring.
dataset/ETHPy150Open igordejanovic/textX/tests/functional/test_textx_language.py/test_regex_match_rule--crossover with--dataset/ETHPy150Open beetbox/beets/beets/util/confit.py/ConfigView.__str__