diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-06-25 16:31:59 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-06-25 16:31:59 -0400 |
commit | f1af8b762a4b1aec6501cd2ae67dd3a0aeef2bfb (patch) | |
tree | a9c304d8b36bffc6b402bfaea54a8f5cff01a3e3 /tests/test_transcript.py | |
parent | b73117be943403cb000efd9f97bc72586261630d (diff) | |
parent | b44ffe7d637d513be5be916f867b29272470c9bd (diff) | |
download | cmd2-git-f1af8b762a4b1aec6501cd2ae67dd3a0aeef2bfb.tar.gz |
Merge pull request #141 from python-cmd2/code_coverage
Fix pastebuffer/clipboard issues on macOS and Linux
Diffstat (limited to 'tests/test_transcript.py')
-rw-r--r-- | tests/test_transcript.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/test_transcript.py b/tests/test_transcript.py index 4a7d57a6..4b6f4c99 100644 --- a/tests/test_transcript.py +++ b/tests/test_transcript.py @@ -15,7 +15,7 @@ import six # Used for sm.input: raw_input() for Python 2 or input() for Python 3 import six.moves as sm -from cmd2 import Cmd, make_option, options, Cmd2TestCase, set_use_arg_list +from cmd2 import Cmd, make_option, options, Cmd2TestCase, set_use_arg_list, set_posix_shlex, set_strip_quotes from conftest import run_cmd, StdOut, normalize @@ -28,6 +28,10 @@ class CmdLineApp(Cmd): # Need to use this older form of invoking super class constructor to support Python 2.x and Python 3.x Cmd.__init__(self, *args, **kwargs) self.settable.append('maxrepeats Max number of `--repeat`s allowed') + + # Configure how arguments are parsed for @options commands + set_posix_shlex(False) + set_strip_quotes(True) set_use_arg_list(False) opts = [make_option('-p', '--piglatin', action="store_true", help="atinLay"), @@ -54,8 +58,7 @@ class CmdLineApp(Cmd): class DemoApp(Cmd): - @options([make_option('-n', '--name', action="store", help="your name"), - ]) + @options(make_option('-n', '--name', action="store", help="your name")) def do_hello(self, arg, opts): """Says hello.""" if opts.name: |