()
| 380 | |
| 381 | |
| 382 | def test_grouping_function(): |
| 383 | p = sqlparse.parse('foo()')[0] |
| 384 | assert isinstance(p.tokens[0], sql.Function) |
| 385 | p = sqlparse.parse('foo(null, bar)')[0] |
| 386 | assert isinstance(p.tokens[0], sql.Function) |
| 387 | assert len(list(p.tokens[0].get_parameters())) == 2 |
| 388 | p = sqlparse.parse('foo(5) over win1')[0] |
| 389 | assert isinstance(p.tokens[0], sql.Function) |
| 390 | assert len(list(p.tokens[0].get_parameters())) == 1 |
| 391 | assert isinstance(p.tokens[0].get_window(), sql.Identifier) |
| 392 | p = sqlparse.parse('foo(5) over (PARTITION BY c1)')[0] |
| 393 | assert isinstance(p.tokens[0], sql.Function) |
| 394 | assert len(list(p.tokens[0].get_parameters())) == 1 |
| 395 | assert isinstance(p.tokens[0].get_window(), sql.Parenthesis) |
| 396 | |
| 397 | |
| 398 | def test_grouping_function_not_in(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…