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

Function test_multiline_token

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

Source from the content-addressed store, hash-verified

54 expect_token(expected, cell, i)
55
56def test_multiline_token():
57 cell = '\n'.join([
58 '"""\n\nxxxxxxxxxx\n\n"""',
59 '5, """',
60 'docstring',
61 'multiline token',
62 '""", [',
63 '2, 3, "complicated"]',
64 'b = hello("string", there)'
65 ])
66 expected = 'hello'
67 start = cell.index(expected) + 1
68 for i in range(start, start + len(expected)):
69 expect_token(expected, cell, i)
70 expected = 'hello'
71 start = cell.index(expected) + 1
72 for i in range(start, start + len(expected)):
73 expect_token(expected, cell, i)
74
75def test_nested_call():
76 cell = "foo(bar(a=5), b=10)"

Callers

nothing calls this directly

Calls 1

expect_tokenFunction · 0.85

Tested by

no test coverage detected