From d9b717a12da7805d5a37b6b659300e449c42bd2f Mon Sep 17 00:00:00 2001 From: Andi Albrecht Date: Sun, 19 Apr 2015 02:11:39 +0200 Subject: Improve detection of aliased identifiers (fixes #185). --- tests/test_grouping.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'tests/test_grouping.py') 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)) -- cgit v1.2.1