diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-04-13 01:50:59 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-04-13 01:50:59 -0400 |
commit | ff63a7055a1d88787b1fd38fc141b1da58601743 (patch) | |
tree | 758042c4913b406b95c0bb2588528997ee798c59 /tests/test_completion.py | |
parent | 26a5f4d8b8396a8792ece1b38a8c68c52247fa22 (diff) | |
download | cmd2-git-ff63a7055a1d88787b1fd38fc141b1da58601743.tar.gz |
Trying to fix Windows unit test when running on AppVeyor
Diffstat (limited to 'tests/test_completion.py')
-rw-r--r-- | tests/test_completion.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_completion.py b/tests/test_completion.py index ad1e5b57..f7caf03a 100644 --- a/tests/test_completion.py +++ b/tests/test_completion.py @@ -9,7 +9,6 @@ Copyright 2017 Todd Leonhardt <todd.leonhardt@gmail.com> Released under MIT license, see LICENSE file """ import argparse -import getpass import os import sys @@ -343,8 +342,9 @@ def test_path_completion_doesnt_match_wildcards(cmd2_app, request): assert cmd2_app.path_complete(text, line, begidx, endidx) == [] def test_path_completion_expand_user_dir(cmd2_app): - # Get the current user - user = getpass.getuser() + # Get the current user. We can't use getpass.getuser() since + # that doesn't work when running these tests on Windows in AppVeyor. + user = os.path.basename(os.path.expanduser('~')) text = '~{}'.format(user) line = 'shell fake {}'.format(text) |