summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2019-05-01 11:55:31 +0200
committerAndi Albrecht <albrecht.andi@gmail.com>2019-05-01 11:55:31 +0200
commit93262c895b955ff50a1bc13536de3024d3eede50 (patch)
tree98a121b71942a0be9fd556f0d242018ae12d15f9 /tests
parent913b56e34edc7e3025feea4744dbd762774805c3 (diff)
downloadsqlparse-93262c895b955ff50a1bc13536de3024d3eede50.tar.gz
Identitfy NULLS FIRST/LAST as keywords (fixes #487).
Diffstat (limited to 'tests')
-rw-r--r--tests/test_tokenize.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_tokenize.py b/tests/test_tokenize.py
index fcd1102..e65a651 100644
--- a/tests/test_tokenize.py
+++ b/tests/test_tokenize.py
@@ -171,6 +171,13 @@ def test_parse_endifloop(s):
assert p.tokens[0].ttype is T.Keyword
+@pytest.mark.parametrize('s', ['NULLS FIRST', 'NULLS LAST'])
+def test_parse_nulls(s): # issue487
+ p = sqlparse.parse(s)[0]
+ assert len(p.tokens) == 1
+ assert p.tokens[0].ttype is T.Keyword
+
+
@pytest.mark.parametrize('s', [
'foo',
'Foo',