diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2009-05-14 06:54:06 +0200 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2009-05-14 06:54:06 +0200 |
| commit | 5ccb54dae178189623b6223ea95e261046c6bb1a (patch) | |
| tree | c9c7d9ae5aad46e54cddcafec8016ef0f4ed8f77 /tests | |
| parent | ab7666e2f1cf5ef09a808eb187da4c4b3a93b1bb (diff) | |
| download | sqlparse-5ccb54dae178189623b6223ea95e261046c6bb1a.tar.gz | |
Make sure that operators in comparsions are not handled too lazy.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_grouping.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tests/test_grouping.py b/tests/test_grouping.py index 51b50e1..d2f08fe 100644 --- a/tests/test_grouping.py +++ b/tests/test_grouping.py @@ -132,6 +132,13 @@ class TestGrouping(TestCaseBase): self.ndiffAssertEqual(s, p.to_unicode()) self.assertEqual(p.tokens[4].get_alias(), 'view') + def test_comparsion_exclude(self): + # make sure operators are not handled too lazy + p = sqlparse.parse('(+)')[0] + self.assert_(isinstance(p.tokens[0], Parenthesis)) + self.assert_(not isinstance(p.tokens[0].tokens[1], Comparsion)) + p = sqlparse.parse('(a+1)')[0] + self.assert_(isinstance(p.tokens[0].tokens[1], Comparsion)) class TestStatement(TestCaseBase): |
