(cmd2_app, request)
| 442 | |
| 443 | |
| 444 | def test_shell_command_complete_in_path(cmd2_app, request) -> None: |
| 445 | test_dir = os.path.dirname(request.module.__file__) |
| 446 | |
| 447 | text = os.path.join(test_dir, "s") |
| 448 | line = f"shell {text}" |
| 449 | |
| 450 | endidx = len(line) |
| 451 | begidx = endidx - len(text) |
| 452 | |
| 453 | # Since this will look for directories and executables in the given path, |
| 454 | # we expect to see the scripts dir among the results |
| 455 | expected = os.path.join(test_dir, "scripts" + os.path.sep) |
| 456 | |
| 457 | completions = cmd2_app.complete(text, line, begidx, endidx) |
| 458 | assert expected in completions.to_strings() |
| 459 | |
| 460 | |
| 461 | def test_path_completion_files_and_directories(cmd2_app, request) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…