MCPcopy Create free account
hub / github.com/ipython/ipython / test_function

Function test_function

IPython/utils/tests/test_tokenutil.py:29–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

27 expect_token("foo", cell, i)
28
29def test_function():
30 cell = "foo(a=5, b='10')"
31 expected = 'foo'
32 # up to `foo(|a=`
33 for i in range(cell.find('a=') + 1):
34 expect_token("foo", cell, i)
35 # find foo after `=`
36 for i in [cell.find('=') + 1, cell.rfind('=') + 1]:
37 expect_token("foo", cell, i)
38 # in between `5,|` and `|b=`
39 for i in range(cell.find(','), cell.find('b=')):
40 expect_token("foo", cell, i)
41
42def test_multiline():
43 cell = '\n'.join([

Callers 1

wrapperFunction · 0.85

Calls 2

expect_tokenFunction · 0.85
findMethod · 0.45

Tested by

no test coverage detected