(use_jedi, evaluation, code, insert_text)
| 2566 | ], |
| 2567 | ) |
| 2568 | def test_undefined_variables(use_jedi, evaluation, code, insert_text): |
| 2569 | offset = len(code) |
| 2570 | ip.Completer.use_jedi = use_jedi |
| 2571 | ip.Completer.evaluation = evaluation |
| 2572 | |
| 2573 | with provisionalcompleter(): |
| 2574 | completions = list(ip.Completer.completions(text=code, offset=offset)) |
| 2575 | insert_texts = insert_text if isinstance(insert_text, list) else [insert_text] |
| 2576 | for text in insert_texts: |
| 2577 | match = [c for c in completions if c.text.lstrip(".") == text] |
| 2578 | message_on_fail = f"{text} not found among {[c.text for c in completions]}" |
| 2579 | assert len(match) == 1, message_on_fail |
| 2580 | |
| 2581 | |
| 2582 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected
searching dependent graphs…