MCPcopy
hub / github.com/andialbrecht/sqlparse / test_aliased_function_without_as

Function test_aliased_function_without_as

tests/test_grouping.py:652–661  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

650
651
652def test_aliased_function_without_as():
653 p = sqlparse.parse('foo() bar')[0].tokens[0]
654 assert p.get_parent_name() is None
655 assert p.get_real_name() == 'foo'
656 assert p.get_alias() == 'bar'
657
658 p = sqlparse.parse('foo.bar() baz')[0].tokens[0]
659 assert p.get_parent_name() == 'foo'
660 assert p.get_real_name() == 'bar'
661 assert p.get_alias() == 'baz'
662
663
664def test_aliased_literal_without_as():

Callers

nothing calls this directly

Calls 3

get_parent_nameMethod · 0.80
get_real_nameMethod · 0.45
get_aliasMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…