MCPcopy Index your code
hub / github.com/ipython/ipython / test_nested_call_kwargs

Function test_nested_call_kwargs

tests/test_tokenutil.py:87–100  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85
86
87def test_nested_call_kwargs():
88 cell = "foo(bar(a=5), b=10)"
89 start = cell.index("bar")
90 last = start + len("bar")
91 for i in range(start, last + 1):
92 expect_token("bar", cell, i)
93 start = cell.index("a=")
94 for i in range(start, start + 3):
95 expect_token("bar", cell, i)
96 expect_token("bar", "foo(bar(a=|5), b=10)")
97 expect_token("bar", "foo(bar(a=5|), b=10)")
98 for i in range(cell.index(")") + 1, cell.index("b=") + 2):
99 expect_token("foo", cell, i)
100 expect_token("foo", cell, len(cell) - 1)
101
102
103def test_nested_call_args():

Callers

nothing calls this directly

Calls 2

expect_tokenFunction · 0.85
indexMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…