#NEWLINE# def test_basetype_match_rule_is_match( ) : #NEWLINE# #INDENT# '\n    Test that ordered choice of basetypes is a match rule.\n    ' #NEWLINE# grammar = '\n    Rule: INT|ID;\n    ' #NEWLINE# meta = metamodel_from_str ( grammar ) #NEWLINE# assert meta #NEWLINE# assert ( meta [ 'Rule' ] . _tx_type is RULE_MATCH ) #NEWLINE# model = meta . model_from_str ( '34' ) #NEWLINE# assert model #NEWLINE# assert ( model . __class__ == int ) #NEWLINE# assert ( model == 34 )