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

Method _test_complete

tests/test_completer.py:501–509  ·  view source on GitHub ↗
(reason, s, comp, start=None, end=None)

Source from the content-addressed store, hash-verified

499 ip = get_ipython()
500
501 def _test_complete(reason, s, comp, start=None, end=None):
502 l = len(s)
503 start = start if start is not None else l
504 end = end if end is not None else l
505 with provisionalcompleter():
506 ip.Completer.use_jedi = True
507 completions = set(ip.Completer.completions(s, l))
508 ip.Completer.use_jedi = False
509 assert Completion(start, end, comp) in completions, reason
510
511 def _test_not_complete(reason, s, comp):
512 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