(cmd2_app)
| 569 | |
| 570 | |
| 571 | def test_path_completion_complete_user(cmd2_app) -> None: |
| 572 | import getpass |
| 573 | |
| 574 | user = getpass.getuser() |
| 575 | |
| 576 | text = f"~{user}" |
| 577 | line = f"shell fake {text}" |
| 578 | endidx = len(line) |
| 579 | begidx = endidx - len(text) |
| 580 | |
| 581 | expected = text + os.path.sep |
| 582 | completions = cmd2_app.path_complete(text, line, begidx, endidx) |
| 583 | assert expected in completions.to_strings() |
| 584 | |
| 585 | |
| 586 | def test_path_completion_user_path_expansion(cmd2_app) -> None: |
nothing calls this directly
no test coverage detected
searching dependent graphs…