def test_without_sql_comment_with_arg_and_leading_comment(): line = "--file moo.txt --persist --comment, not arg" expected = "--file moo.txt --persist" assert without_sql_comment(parser=parser_stub, line=line) == expected
def test_without_sql_persist(): line = "--persist my_table --uff da" expected = "--persist my_table" assert without_sql_comment(parser=parser_stub, line=line) == expected
def test_without_sql_comment_dashes_in_string(): line = "SELECT '--very --confusing' FROM author -- uff da" expected = "SELECT '--very --confusing' FROM author" assert without_sql_comment(parser=parser_stub, line=line) == expected
def test_without_sql_comment_unspaced_comment(): line = "SELECT * FROM author --uff da" expected = "SELECT * FROM author" assert without_sql_comment(parser=parser_stub, line=line) == expected
def test_without_sql_comment_with_arg_and_comment(): line = "--file moo.txt --persist SELECT * FROM author -- uff da" expected = "--file moo.txt --persist SELECT * FROM author" assert without_sql_comment(parser=parser_stub, line=line) == expected
def test_without_sql_comment_with_arg(): line = "--file moo.txt --persist SELECT * FROM author" assert without_sql_comment(parser=parser_stub, line=line) == line
def test_without_sql_comment_plain(): line = "SELECT * FROM author" assert without_sql_comment(parser=parser_stub, line=line) == line