summaryrefslogtreecommitdiff
path: root/tests/test_bashcompletion.py
diff options
context:
space:
mode:
authorkotfu <kotfu@kotfu.net>2018-05-23 20:59:26 -0600
committerkotfu <kotfu@kotfu.net>2018-05-23 20:59:26 -0600
commit1a70b90f375997751bc7df16b5e3f58c6194c71b (patch)
tree1abe43d088060e24bb889e3db19fc5a1a4a82562 /tests/test_bashcompletion.py
parentb1516f4b09518bb6d33abfeb14e1459ed03f34d8 (diff)
parent5d64ebee348aeffb02fc385f903c9af431e3721b (diff)
downloadcmd2-git-1a70b90f375997751bc7df16b5e3f58c6194c71b.tar.gz
Merge branch 'master' into speedup_import
# Conflicts: # cmd2/cmd2.py # tests/test_completion.py # tests/test_submenu.py
Diffstat (limited to 'tests/test_bashcompletion.py')
-rw-r--r--tests/test_bashcompletion.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/tests/test_bashcompletion.py b/tests/test_bashcompletion.py
index ceae2aa9..298bdf1e 100644
--- a/tests/test_bashcompletion.py
+++ b/tests/test_bashcompletion.py
@@ -139,15 +139,13 @@ def test_invalid_ifs(parser1, mock):
@pytest.mark.parametrize('comp_line, exp_out, exp_err', [
('media ', 'movies\013shows', ''),
('media mo', 'movies', ''),
+ ('media movies list -a "J', '"John Boyega"\013"Jake Lloyd"', ''),
+ ('media movies list ', '', ''),
('media movies add ', '\013\013 ', '''
Hint:
TITLE Movie Title'''),
- ('media movies list -a "J', '"John Boyega"\013"Jake Lloyd"', ''),
- ('media movies list ', '', '')
])
def test_commands(parser1, capfd, mock, comp_line, exp_out, exp_err):
- completer = CompletionFinder()
-
mock.patch.dict(os.environ, {'_ARGCOMPLETE': '1',
'_ARGCOMPLETE_IFS': '\013',
'COMP_TYPE': '63',
@@ -157,6 +155,8 @@ def test_commands(parser1, capfd, mock, comp_line, exp_out, exp_err):
mock.patch.object(os, 'fdopen', my_fdopen)
with pytest.raises(SystemExit):
+ completer = CompletionFinder()
+
choices = {'actor': query_actors, # function
}
autocompleter = AutoCompleter(parser1, arg_choices=choices)