diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-09-25 18:16:22 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-09-25 18:16:22 -0400 |
commit | 45d2398b3023543ed1615115db5d35b1fd65dc5b (patch) | |
tree | c2af42bab5f3aacdd507dcaea801581a306d0a92 /tests/test_argparse.py | |
parent | 7cc94ab98c007210b344fbb1af965570fae63959 (diff) | |
parent | dac03119e5932f8a34a1318122e2f45fa875084c (diff) | |
download | cmd2-git-45d2398b3023543ed1615115db5d35b1fd65dc5b.tar.gz |
Merge branch 'master' into command_help_noflag
Diffstat (limited to 'tests/test_argparse.py')
-rw-r--r-- | tests/test_argparse.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/test_argparse.py b/tests/test_argparse.py index 469cbe76..bf20710b 100644 --- a/tests/test_argparse.py +++ b/tests/test_argparse.py @@ -6,9 +6,9 @@ import argparse import pytest import cmd2 -from unittest import mock +from cmd2.utils import StdSim -from .conftest import run_cmd, StdOut +from .conftest import run_cmd # Prefer statically linked gnureadline if available (for macOS compatibility due to issues with libedit) try: @@ -115,7 +115,7 @@ class ArgparseApp(cmd2.Cmd): @pytest.fixture def argparse_app(): app = ArgparseApp() - app.stdout = StdOut() + app.stdout = StdSim(app.stdout) return app @@ -217,12 +217,12 @@ class SubcommandApp(cmd2.Cmd): func(self, args) else: # No subcommand was provided, so call help - self.do_help('base') + self.do_help(['base']) @pytest.fixture def subcommand_app(): app = SubcommandApp() - app.stdout = StdOut() + app.stdout = StdSim(app.stdout) return app |