MCPcopy Index your code
hub / github.com/python-cmd2/cmd2 / test_path_completion_complete_user

Function test_path_completion_complete_user

tests/test_completion.py:571–583  ·  view source on GitHub ↗
(cmd2_app)

Source from the content-addressed store, hash-verified

569
570
571def 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
586def test_path_completion_user_path_expansion(cmd2_app) -> None:

Callers

nothing calls this directly

Calls 2

path_completeMethod · 0.80
to_stringsMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…