summaryrefslogtreecommitdiff
path: root/tests/test_grouping.py
diff options
context:
space:
mode:
authorAndi Albrecht <albrecht.andi@gmail.com>2015-07-26 14:35:32 +0200
committerAndi Albrecht <albrecht.andi@gmail.com>2015-07-26 14:35:32 +0200
commit5df394485efbbbc5413b21b9efd6f039ff18fae1 (patch)
tree17a4cd907c79d5e7e75de7cf8c68dbb7dd9f1895 /tests/test_grouping.py
parentd463a753216b5c9e2c7f2b3c8a48fa76cbdb73c2 (diff)
parent8987a3a6b540ea35bbb1f9c5f49f3306501289cd (diff)
downloadsqlparse-v0.2.0.tar.gz
Merge branch 'master' into v0.2.0v0.2.0
Diffstat (limited to 'tests/test_grouping.py')
-rw-r--r--tests/test_grouping.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_grouping.py b/tests/test_grouping.py
index 0c2f108..5b87a38 100644
--- a/tests/test_grouping.py
+++ b/tests/test_grouping.py
@@ -187,6 +187,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))