(text, suggestion, expected, cursor)
| 210 | ], |
| 211 | ) |
| 212 | def 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 | |
| 222 | def test_autosuggest_token_empty(): |
nothing calls this directly
no test coverage detected
searching dependent graphs…