Skip to content

Commit

Permalink
SNOW-1019480-sql-filter-nonsql-statements: test for railing query
Browse files Browse the repository at this point in the history
  • Loading branch information
sfc-gh-mraba committed Jan 31, 2024
1 parent 3454440 commit e1cc1d4
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests_integration/test_sql.py
Original file line number Diff line number Diff line change
Expand Up @@ -100,3 +100,14 @@ def _log(
assert query_0 == "13"
assert time_1 - time_0 >= 10.0
assert "waited 10 seconds" in query_1


@pytest.mark.integration
@pytest.mark.usefixtures("snowflake_session, test_root_path")
def test_trailing_comments_queries(runner):
trailin_comment_query = "select 1;\n\n-- trailing comment\n"
result = runner.invoke_with_connection_json(["sql", "-q", trailin_comment_query])
assert result.exit_code == 0
assert result.json == [
["1"],
]

0 comments on commit e1cc1d4

Please sign in to comment.