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

Function test_navigable_provider_connection

tests/test_shortcuts.py:360–383  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

358
359
360def test_navigable_provider_connection():
361 provider = NavigableAutoSuggestFromHistory()
362 provider.skip_lines = 1
363
364 session_1 = create_session_mock()
365 provider.connect(session_1)
366
367 assert provider.skip_lines == 1
368 session_1.default_buffer.on_text_insert.fire()
369 assert provider.skip_lines == 0
370
371 session_2 = create_session_mock()
372 provider.connect(session_2)
373 provider.skip_lines = 2
374
375 assert provider.skip_lines == 2
376 session_2.default_buffer.on_text_insert.fire()
377 assert provider.skip_lines == 0
378
379 provider.skip_lines = 3
380 provider.disconnect()
381 session_1.default_buffer.on_text_insert.fire()
382 session_2.default_buffer.on_text_insert.fire()
383 assert provider.skip_lines == 3
384
385
386@pytest.fixture

Callers

nothing calls this directly

Calls 4

connectMethod · 0.95
disconnectMethod · 0.95
create_session_mockFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…