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

Method test_completion_have_signature

tests/test_completer.py:534–547  ·  view source on GitHub ↗

Lets make sure jedi is capable of pulling out the signature of the function we are completing.

(self)

Source from the content-addressed store, hash-verified

532 reason="Parso does not yet parse 3.13",
533 )
534 def test_completion_have_signature(self):
535 """
536 Lets make sure jedi is capable of pulling out the signature of the function we are completing.
537 """
538 ip = get_ipython()
539 with provisionalcompleter():
540 ip.Completer.use_jedi = True
541 completions = ip.Completer.completions("ope", 3)
542 c = next(completions) # should be `open`
543 ip.Completer.use_jedi = False
544 assert "file" in c.signature, "Signature of function was not found by completer"
545 assert (
546 "encoding" in c.signature
547 ), "Signature of function was not found by completer"
548
549 @pytest.mark.xfail(
550 sys.version_info.releaselevel in ("alpha",),

Callers

nothing calls this directly

Calls 3

get_ipythonFunction · 0.90
provisionalcompleterFunction · 0.90
completionsMethod · 0.80

Tested by

no test coverage detected