def assert_ast( code, expected_ast ): assert_multi_line_equal( textwrap.dedent( expected_ast ), _ast( tools_lex.lex( code ) ) )
def assert_parsed( code, expected_parsed ): assert_multi_line_equal( _unprettify( textwrap.dedent( expected_parsed ) ), _parse( tools_lex.lex( code ) ) )