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

Method _test_complete

IPython/core/tests/test_completer.py:394–402  ·  view source on GitHub ↗
(reason, s, comp, start=None, end=None)

Source from the content-addressed store, hash-verified

392 ip = get_ipython()
393
394 def _test_complete(reason, s, comp, start=None, end=None):
395 l = len(s)
396 start = start if start is not None else l
397 end = end if end is not None else l
398 with provisionalcompleter():
399 ip.Completer.use_jedi = True
400 completions = set(ip.Completer.completions(s, l))
401 ip.Completer.use_jedi = False
402 assert_in(Completion(start, end, comp), completions, reason)
403
404 def _test_not_complete(reason, s, comp):
405 l = len(s)

Callers

nothing calls this directly

Calls 3

provisionalcompleterFunction · 0.90
CompletionClass · 0.90
completionsMethod · 0.80

Tested by

no test coverage detected