Esempio n. 1
0
def assert_ast( code, expected_ast ):
    assert_multi_line_equal(
        textwrap.dedent( expected_ast ),
        _ast( tools_lex.lex( code ) )
    )
Esempio n. 2
0
def assert_parsed( code, expected_parsed ):
    assert_multi_line_equal(
        _unprettify( textwrap.dedent( expected_parsed ) ),
        _parse( tools_lex.lex( code ) )
    )