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

Function test_undefined_variables_without_jedi

tests/test_completer.py:2654–2665  ·  view source on GitHub ↗
(code, insert_text)

Source from the content-addressed store, hash-verified

2652 ],
2653)
2654def test_undefined_variables_without_jedi(code, insert_text):
2655 offset = len(code)
2656 ip.Completer.use_jedi = False
2657 ip.Completer.evaluation = "limited"
2658
2659 with provisionalcompleter():
2660 completions = list(ip.Completer.completions(text=code, offset=offset))
2661 insert_texts = insert_text if isinstance(insert_text, list) else [insert_text]
2662 for text in insert_texts:
2663 match = [c for c in completions if c.text.lstrip(".") == text]
2664 message_on_fail = f"{text} not found among {[c.text for c in completions]}"
2665 assert len(match) == 1, message_on_fail
2666
2667
2668@pytest.mark.parametrize(

Callers

nothing calls this directly

Calls 2

provisionalcompleterFunction · 0.90
completionsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…