diff options
| author | spigwitmer <itgpmc@gmail.com> | 2014-02-05 08:49:15 -0800 |
|---|---|---|
| committer | spigwitmer <itgpmc@gmail.com> | 2014-02-05 08:49:15 -0800 |
| commit | cb4aff931dbc2027a9e504368a128d1fbbc5b1d8 (patch) | |
| tree | 4678d8c4882a2b8be19cef5824d1d417eb46fa87 /tests | |
| parent | a6a4bccb5840303e134e514c9a604dd2bbb32703 (diff) | |
| download | sqlparse-cb4aff931dbc2027a9e504368a128d1fbbc5b1d8.tar.gz | |
Fix Function.get_parameters() returning empty list for SQL functions that have a single nested function as a param
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/test_parse.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/tests/test_parse.py b/tests/test_parse.py index 27da5b5..6d7f7df 100644 --- a/tests/test_parse.py +++ b/tests/test_parse.py @@ -121,6 +121,11 @@ class SQLParseTest(TestCaseBase): self.assertEqual(len(t), 1) self.assert_(t[0].ttype is T.Number.Integer) + def test_nested_function(self): + t = sqlparse.parse('foo(bar(5))')[0].tokens[0].get_parameters() + self.assertEqual(len(t), 1) + self.assert_(type(t[0]) is sqlparse.sql.Function) + def test_quoted_identifier(): t = sqlparse.parse('select x.y as "z" from foo')[0].tokens |
