identifier lists should still work in subqueries with aliases
()
| 208 | |
| 209 | |
| 210 | def test_grouping_identifier_list_subquery(): |
| 211 | """identifier lists should still work in subqueries with aliases""" |
| 212 | p = sqlparse.parse("select * from (" |
| 213 | "select a, b + c as d from table) sub")[0] |
| 214 | subquery = p.tokens[-1].tokens[0] |
| 215 | idx, iden_list = subquery.token_next_by(i=sql.IdentifierList) |
| 216 | assert iden_list is not None |
| 217 | # all the identifiers should be within the IdentifierList |
| 218 | _, ilist = subquery.token_next_by(i=sql.Identifier, idx=idx) |
| 219 | assert ilist is None |
| 220 | |
| 221 | |
| 222 | def test_grouping_identifier_list_case(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…