def test_decode_stmt(): assert ( transform_string('with $qq:\n body') == "qq._quote_stmt(0,' body')\n" ) assert ( transform_string('with $qq:\n body\nout') == "qq._quote_stmt(0,' body\\n')\n\nout" )
def test_decode_expr(): assert transform_string('[$qq|body|]') == "qq._quote_expr(0,' body')"
def test_decode_stmt(): assert (transform_string('with $qq:\n body') == "qq._quote_stmt(0,' body')\n") assert (transform_string('with $qq:\n body\nout') == "qq._quote_stmt(0,' body\\n')\n\nout")