diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2018-09-24 10:16:46 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-24 10:16:46 -0400 |
commit | e5e8a7954b9ace78cd49ef43c5f8d6203c227f0f (patch) | |
tree | d6589102bb8044ef9a03b4f6ac36ed63951b9329 /tests/test_argparse.py | |
parent | dbe485957b421f6fd973b3a493de7b264b363d54 (diff) | |
parent | 0bf2824bcb9c00ee56dde660b432990fc0df22f4 (diff) | |
download | cmd2-git-e5e8a7954b9ace78cd49ef43c5f8d6203c227f0f.tar.gz |
Merge pull request #534 from python-cmd2/copy_stream
Fixed several hack classes built to simulate file descriptors
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 |