diff options
| author | Andi Albrecht <albrecht.andi@gmail.com> | 2015-04-19 02:11:39 +0200 |
|---|---|---|
| committer | Andi Albrecht <albrecht.andi@gmail.com> | 2015-04-19 02:11:39 +0200 |
| commit | d9b717a12da7805d5a37b6b659300e449c42bd2f (patch) | |
| tree | 3c6510ae3d617995b4514053e3a3fc87331fdd8e /tests | |
| parent | 4f5195481a89e87a07a064d2c253bb6f74e911d4 (diff) | |
| download | sqlparse-d9b717a12da7805d5a37b6b659300e449c42bd2f.tar.gz | |
Improve detection of aliased identifiers (fixes #185).
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_grouping.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_grouping.py b/tests/test_grouping.py index b6edafe..5ade830 100644 --- a/tests/test_grouping.py +++ b/tests/test_grouping.py @@ -186,6 +186,11 @@ class TestGrouping(TestCaseBase): self.assertEqual(len(p.tokens), 1) self.assertEqual(p.tokens[0].get_alias(), 'foo') + def test_alias_returns_none(self): # see issue185 + p = sqlparse.parse('foo.bar')[0] + self.assertEqual(len(p.tokens), 1) + self.assertEqual(p.tokens[0].get_alias(), None) + def test_idlist_function(self): # see issue10 too p = sqlparse.parse('foo(1) x, bar')[0] self.assert_(isinstance(p.tokens[0], sql.IdentifierList)) |
