diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2016-10-24 20:06:39 +0200 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2016-10-24 20:06:39 +0200 |
| commit | b68e4b781b8d74b0222411e83a16408a83cde7d6 (patch) | |
| tree | 2b8538cd16986986a2f0495ded2354f293d39058 /tests | |
| parent | ce7125072675d4c5391c5dddadb2a95946e62568 (diff) | |
| download | sqlparse-b68e4b781b8d74b0222411e83a16408a83cde7d6.tar.gz | |
Fix special case for #284 when statement starts with orphaned AS.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_regressions.py | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tests/test_regressions.py b/tests/test_regressions.py index ba908d3..d646325 100644 --- a/tests/test_regressions.py +++ b/tests/test_regressions.py @@ -316,7 +316,10 @@ def test_token_next_doesnt_ignore_skip_cm(): assert tok.value == 'select' -def test_issue284_as_grouping(): - sql = 'SELECT x AS' - p = sqlparse.parse(sql)[0] - assert sql == str(p) +@pytest.mark.parametrize('s', [ + 'SELECT x AS', + 'AS' +]) +def test_issue284_as_grouping(s): + p = sqlparse.parse(s)[0] + assert s == str(p) |
