diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-03-18 14:41:45 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-03-18 14:41:45 -0400 |
commit | b472d2b4a74960c67612607246d3ab7141b22f24 (patch) | |
tree | ca0d9ec277c635a2ca492e269f2e28fb89f55ed4 /tests/test_completion.py | |
parent | e09a46097f2fe254191f5fa3d8734836ff5519a6 (diff) | |
download | cmd2-git-b472d2b4a74960c67612607246d3ab7141b22f24.tar.gz |
Fixing more unit tests
Diffstat (limited to 'tests/test_completion.py')
-rw-r--r-- | tests/test_completion.py | 11 |
1 files changed, 4 insertions, 7 deletions
diff --git a/tests/test_completion.py b/tests/test_completion.py index 697e68d4..37630159 100644 --- a/tests/test_completion.py +++ b/tests/test_completion.py @@ -403,17 +403,14 @@ def test_path_completion_user_expansion(): line = 'shell {} ~{}'.format(cmd, os.path.sep) endidx = len(line) - begidx = endidx - len(text) + begidx = endidx completions_tilde_slash = path_complete(text, line, begidx, endidx) # Run path complete on the user's home directory - user_dir = os.path.expanduser('~') - if sys.platform.startswith('win'): - line = 'shell dir {}'.format(user_dir) - else: - line = 'shell ls {}'.format(user_dir) + user_dir = os.path.expanduser('~') + os.path.sep + line = 'shell {} {}'.format(cmd, user_dir) endidx = len(line) - begidx = endidx - len(text) + begidx = endidx completions_home = path_complete(text, line, begidx, endidx) # Verify that the results are the same in both cases |