diff options
| author | Adam Greenhall <agreenhall@lyft.com> | 2015-09-12 14:49:47 -0700 |
|---|---|---|
| committer | Victor Uriarte <victor.m.uriarte@intel.com> | 2016-06-06 06:31:35 -0700 |
| commit | 2928a7c8f1192b8376795368825c2cf2dae243c3 (patch) | |
| tree | 00e1eb738b20012ed671e0e36ee27c99f619ee14 /tests/test_grouping.py | |
| parent | 4c70aeaa2a8b1652553cc5a10bd593694cb3073f (diff) | |
| download | sqlparse-2928a7c8f1192b8376795368825c2cf2dae243c3.tar.gz | |
Add filter `Spaces around Operators`
Diffstat (limited to 'tests/test_grouping.py')
| -rw-r--r-- | tests/test_grouping.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_grouping.py b/tests/test_grouping.py index 1971fb7..40a35cf 100644 --- a/tests/test_grouping.py +++ b/tests/test_grouping.py @@ -150,6 +150,10 @@ class TestGrouping(TestCaseBase): self.assert_(isinstance(p.tokens[0].tokens[0], sql.Identifier)) self.assert_(isinstance(p.tokens[0].tokens[3], sql.Identifier)) + def test_identifiers_with_operators(self): + p = sqlparse.parse('a+b as c from table where (d-e)%2= 1')[0] + self.assertEqual(len([x for x in p.flatten() if x.ttype == sqlparse.tokens.Name]), 5) + def test_identifier_list_with_order(self): # issue101 p = sqlparse.parse('1, 2 desc, 3')[0] self.assert_(isinstance(p.tokens[0], sql.IdentifierList)) |
