diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-06-09 16:32:45 -0400 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-06-09 16:32:45 -0400 |
commit | bcf4091723d5f1d5ac14ce8df98236d65f522da8 (patch) | |
tree | 3d1de8506ae99fe1be07b8baa735305d5f6e908c | |
parent | 10e703682a194ad692616d0c240def4c90fbd748 (diff) | |
download | cmd2-git-bcf4091723d5f1d5ac14ce8df98236d65f522da8.tar.gz |
Going back to all parameterized bash completion tests disabled on TravisCI
-rw-r--r-- | tests/test_bashcompletion.py | 29 |
1 files changed, 2 insertions, 27 deletions
diff --git a/tests/test_bashcompletion.py b/tests/test_bashcompletion.py index a630fd3c..47fcdb34 100644 --- a/tests/test_bashcompletion.py +++ b/tests/test_bashcompletion.py @@ -136,42 +136,17 @@ def test_invalid_ifs(parser1, mock): # noinspection PyShadowingNames -@pytest.mark.skipif(skip_no_argcomplete or skip_windows or skip_mac, reason=skip_reason) -@pytest.mark.parametrize('comp_line, exp_out, exp_err', [ - ('media mo', 'movies', ''), -]) -def test_commands_travis(parser1, capfd, mock, comp_line, exp_out, exp_err): - mock.patch.dict(os.environ, {'_ARGCOMPLETE': '1', - '_ARGCOMPLETE_IFS': '\013', - 'COMP_TYPE': '63', - 'COMP_LINE': comp_line, - 'COMP_POINT': str(len(comp_line))}) - - mock.patch.object(os, 'fdopen', my_fdopen) - - with pytest.raises(SystemExit): - completer = CompletionFinder() - - choices = {'actor': query_actors, # function - } - autocompleter = AutoCompleter(parser1, arg_choices=choices) - completer(parser1, autocompleter, exit_method=sys.exit) - - out, err = capfd.readouterr() - assert out == exp_out - assert err == exp_err - -# noinspection PyShadowingNames @pytest.mark.skipif(skip or skip_mac, reason=skip_reason) @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'''), ]) -def test_commands_local(parser1, capfd, mock, comp_line, exp_out, exp_err): +def test_commands(parser1, capfd, mock, comp_line, exp_out, exp_err): mock.patch.dict(os.environ, {'_ARGCOMPLETE': '1', '_ARGCOMPLETE_IFS': '\013', 'COMP_TYPE': '63', |