diff options
author | kotfu <kotfu@kotfu.net> | 2018-04-22 19:11:29 -0600 |
---|---|---|
committer | kotfu <kotfu@kotfu.net> | 2018-04-22 19:11:29 -0600 |
commit | f83154e2749d90bf4ec24c7c84b45dc0860e8b13 (patch) | |
tree | a5e3db489b3ae69320eabb296eb01311dac9dd02 /tests/test_shlexparsing.py | |
parent | 829c36cb22fd7f3b71548c1b742d40e7609a3aca (diff) | |
download | cmd2-git-f83154e2749d90bf4ec24c7c84b45dc0860e8b13.tar.gz |
args has to be ‘’ not None
Diffstat (limited to 'tests/test_shlexparsing.py')
-rw-r--r-- | tests/test_shlexparsing.py | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/tests/test_shlexparsing.py b/tests/test_shlexparsing.py index 9142e178..fd010384 100644 --- a/tests/test_shlexparsing.py +++ b/tests/test_shlexparsing.py @@ -14,7 +14,6 @@ Notes: are with pyparsing. - valid comment styles: - C-style -> /* comment */ - - C++-style -> // comment - Python/Shell style -> # comment Functions in cmd2.py to be modified: @@ -43,8 +42,8 @@ def test_parse_empty_string(parser): assert not results.command @pytest.mark.parametrize('tokens,command,args', [ - ( [], None, None), - ( ['command'], 'command', None ), + ( [], None, ''), + ( ['command'], 'command', '' ), ( ['command', 'arg1', 'arg2'], 'command', 'arg1 arg2') ]) def test_command_and_args(parser, tokens, command, args): @@ -113,12 +112,6 @@ def test_parse_what_if_quoted_strings_seem_to_start_comments(parser): assert results.args == 'if "quoted strings /* seem to " start comments?' assert not results.pipeTo -def test_cpp_comment(parser): - results = parser.parseString('hi // this is | all a comment */') - assert results.command == 'hi' - assert not results.args - assert not results.pipeTo - def test_simple_piped(parser): results = parser.parseString('simple | piped') assert results.command == 'simple' |