summaryrefslogtreecommitdiff
path: root/tests/test_parse.py
diff options
context:
space:
mode:
authorspigwitmer <itgpmc@gmail.com>2014-02-04 14:08:55 -0800
committerspigwitmer <itgpmc@gmail.com>2014-02-04 14:08:55 -0800
commitf00a59e1b25c466da1d2612405f7abb7c93db207 (patch)
tree147dc85e87ab47f7e75f4c76f3fb853b56f527e5 /tests/test_parse.py
parentd7f9ac827a497300333db635a0c4303da3d63e07 (diff)
downloadsqlparse-f00a59e1b25c466da1d2612405f7abb7c93db207.tar.gz
Fix Function.get_parameters() with 1 literal as its parameter
Diffstat (limited to 'tests/test_parse.py')
-rw-r--r--tests/test_parse.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_parse.py b/tests/test_parse.py
index a6145d8..27da5b5 100644
--- a/tests/test_parse.py
+++ b/tests/test_parse.py
@@ -116,6 +116,11 @@ class SQLParseTest(TestCaseBase):
self.assertEqual(len(t), 1)
self.assert_(isinstance(t[0], sqlparse.sql.Identifier))
+ def test_function_param_single_literal(self):
+ t = sqlparse.parse('foo(5)')[0].tokens[0].get_parameters()
+ self.assertEqual(len(t), 1)
+ self.assert_(t[0].ttype is T.Number.Integer)
+
def test_quoted_identifier():
t = sqlparse.parse('select x.y as "z" from foo')[0].tokens