(code, insert_text)
| 2652 | ], |
| 2653 | ) |
| 2654 | def 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( |
nothing calls this directly
no test coverage detected
searching dependent graphs…