diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-12-07 00:30:07 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-12-07 00:30:07 -0500 |
commit | 3efb3f14630d007572a5cf1246bdb78ee63be089 (patch) | |
tree | 866d68fa90a90e65070cd50f30a001dd52121531 /tests/test_bashcompletion.py | |
parent | 64119e208bad3bfb151da5184461d74b6d1af3b6 (diff) | |
parent | 93accd4bf510bb93402847377f4af9b22e126147 (diff) | |
download | cmd2-git-3efb3f14630d007572a5cf1246bdb78ee63be089.tar.gz |
Merge pull request #610 from python-cmd2/pytestupdates
Fix pytest deprecation warnings
Diffstat (limited to 'tests/test_bashcompletion.py')
-rw-r--r-- | tests/test_bashcompletion.py | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/tests/test_bashcompletion.py b/tests/test_bashcompletion.py index c7201e4b..b99c3fea 100644 --- a/tests/test_bashcompletion.py +++ b/tests/test_bashcompletion.py @@ -124,13 +124,13 @@ def my_fdopen(fd, mode, *args): # noinspection PyShadowingNames @pytest.mark.skipif(skip_no_argcomplete or skip_windows, reason=skip_reason) -def test_invalid_ifs(parser1, mock): +def test_invalid_ifs(parser1, mocker): completer = CompletionFinder() - mock.patch.dict(os.environ, {'_ARGCOMPLETE': '1', + mocker.patch.dict(os.environ, {'_ARGCOMPLETE': '1', '_ARGCOMPLETE_IFS': '\013\013'}) - mock.patch.object(os, 'fdopen', my_fdopen) + mocker.patch.object(os, 'fdopen', my_fdopen) with pytest.raises(SystemExit): completer(parser1, AutoCompleter(parser1), exit_method=sys.exit) @@ -178,16 +178,16 @@ def fdopen_fail_8(fd, mode, *args): # noinspection PyShadowingNames @pytest.mark.skipif(skip_no_argcomplete or skip_windows, reason=skip_reason) -def test_fail_alt_stdout(parser1, mock): +def test_fail_alt_stdout(parser1, mocker): completer = CompletionFinder() comp_line = 'media movies list ' - mock.patch.dict(os.environ, {'_ARGCOMPLETE': '1', + mocker.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', fdopen_fail_8) + mocker.patch.object(os, 'fdopen', fdopen_fail_8) try: choices = {'actor': query_actors, # function |