diff options
| author | John Bodley <john.bodley@airbnb.com> | 2019-01-14 22:38:55 -0800 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2019-03-10 08:59:16 +0100 |
| commit | c4e9dae235abca0b4ae7099f9f9000c075b3a8e5 (patch) | |
| tree | cc22e90b165fb4339537d66ab068ca6ccad5852c /tests/test_tokenize.py | |
| parent | 8fd25a972b3d4123cee9ceb8276bc834507753ef (diff) | |
| download | sqlparse-c4e9dae235abca0b4ae7099f9f9000c075b3a8e5.tar.gz | |
[tokenizer] Grouping GROUP/ORDER BY
Diffstat (limited to 'tests/test_tokenize.py')
| -rw-r--r-- | tests/test_tokenize.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/test_tokenize.py b/tests/test_tokenize.py index b548541..23a5157 100644 --- a/tests/test_tokenize.py +++ b/tests/test_tokenize.py @@ -183,3 +183,15 @@ def test_parse_identifiers(s): token = p.tokens[0] assert str(token) == s assert isinstance(token, sql.Identifier) + + +def test_parse_group_by(): + p = sqlparse.parse('GROUP BY')[0] + assert len(p.tokens) == 1 + assert p.tokens[0].ttype is T.Keyword + + +def test_parse_order_by(): + p = sqlparse.parse('ORDER BY')[0] + assert len(p.tokens) == 1 + assert p.tokens[0].ttype is T.Keyword |
