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

Function test_accept_and_keep_cursor

tests/test_shortcuts.py:212–219  ·  view source on GitHub ↗
(text, suggestion, expected, cursor)

Source from the content-addressed store, hash-verified

210 ],
211)
212def test_accept_and_keep_cursor(text, suggestion, expected, cursor):
213 event = make_event(text, cursor, suggestion)
214 buffer = event.current_buffer
215 buffer.insert_text = Mock()
216 accept_and_keep_cursor(event)
217 assert buffer.insert_text.called
218 assert buffer.insert_text.call_args[0] == (expected,)
219 assert buffer.cursor_position == cursor
220
221
222def test_autosuggest_token_empty():

Callers

nothing calls this directly

Calls 2

accept_and_keep_cursorFunction · 0.90
make_eventFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…