Пример #1
0
def test_return_node_str():
    ''' Check the node_str method of the Return class.'''
    return_stmt = Return()
    coloredtext = colored("Return", Return._colour)
    assert coloredtext + "[]" in return_stmt.node_str()
Пример #2
0
def test_return_node_str():
    ''' Check the node_str method of the Return class.'''
    from psyclone.psyir.nodes.node import colored, SCHEDULE_COLOUR_MAP
    return_stmt = Return()
    coloredtext = colored("Return", SCHEDULE_COLOUR_MAP["Return"])
    assert coloredtext+"[]" in return_stmt.node_str()