diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2013-10-24 05:59:09 +0200 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2013-10-24 05:59:09 +0200 |
| commit | e7b8ad372f6cfe6d14dcf1c7dc696a24b493e58c (patch) | |
| tree | ca1c351c2fb874a0630ed65c8d364bdcec2ad982 /tests | |
| parent | 6efac742ec8505734432dbb1e6fb50d188369fac (diff) | |
| download | sqlparse-e7b8ad372f6cfe6d14dcf1c7dc696a24b493e58c.tar.gz | |
Add test case for JOIN, update Changelog and AUTHORS.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_tokenize.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/test_tokenize.py b/tests/test_tokenize.py index 3b529d9..0b23fa8 100644 --- a/tests/test_tokenize.py +++ b/tests/test_tokenize.py @@ -163,11 +163,12 @@ class TestStream(unittest.TestCase): self.assertEqual(tokens[1][0], Error) -def test_parse_join(): - p = sqlparse.parse('LEFT JOIN foo')[0] - assert len(p.tokens) == 3 - assert p.tokens[0].ttype is Keyword - p = sqlparse.parse('LEFT OUTER JOIN foo')[0] +@pytest.mark.parametrize('expr', ['JOIN', 'LEFT JOIN', 'LEFT OUTER JOIN', + 'FULL OUTER JOIN', 'NATURAL JOIN', + 'CROSS JOIN', 'STRAIGHT JOIN', + 'INNER JOIN', 'LEFT INNER JOIN']) +def test_parse_join(expr): + p = sqlparse.parse('%s foo' % expr)[0] assert len(p.tokens) == 3 assert p.tokens[0].ttype is Keyword |
