Exemplo n.º 1
0
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
Exemplo n.º 2
0
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
Exemplo n.º 3
0
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
Exemplo n.º 4
0
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
Exemplo n.º 5
0
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
Exemplo n.º 6
0
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
Exemplo n.º 7
0
def test_without_sql_comment_plain():

    line = "SELECT * FROM author"
    assert without_sql_comment(parser=parser_stub, line=line) == line