(ac_app, command_and_args, text, expected_data)
| 565 | ], |
| 566 | ) |
| 567 | def test_autcomp_flag_completion(ac_app, command_and_args, text, expected_data) -> None: |
| 568 | line = f"{command_and_args} {text}" |
| 569 | endidx = len(line) |
| 570 | begidx = endidx - len(text) |
| 571 | |
| 572 | expected_completions = Completions(items=[CompletionItem(value=v, display=d) for v, d in expected_data]) |
| 573 | completions = ac_app.complete(text, line, begidx, endidx) |
| 574 | |
| 575 | assert completions.to_strings() == expected_completions.to_strings() |
| 576 | assert [item.display for item in completions] == [item.display for item in expected_completions] |
| 577 | |
| 578 | |
| 579 | @pytest.mark.parametrize( |
nothing calls this directly
no test coverage detected
searching dependent graphs…