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

Function test_autosuggest_at_EOL

tests/test_shortcuts.py:117–129  ·  view source on GitHub ↗

test that autosuggest is only applied at end of line.

(text, cursor, suggestion, called)

Source from the content-addressed store, hash-verified

115 ],
116)
117def test_autosuggest_at_EOL(text, cursor, suggestion, called):
118 """
119 test that autosuggest is only applied at end of line.
120 """
121
122 event = make_event(text, cursor, suggestion)
123 event.current_buffer.insert_text = Mock()
124 accept_or_jump_to_end(event)
125 if called:
126 event.current_buffer.insert_text.assert_called()
127 else:
128 event.current_buffer.insert_text.assert_not_called()
129 # event.current_buffer.document.get_end_of_line_position.assert_called()
130
131
132@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 2

accept_or_jump_to_endFunction · 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…