diff options
author | kotfu <kotfu@kotfu.net> | 2018-04-29 15:33:18 -0600 |
---|---|---|
committer | kotfu <kotfu@kotfu.net> | 2018-04-29 15:33:18 -0600 |
commit | 39e74f6b60b8701b14da29693f909ab407242f73 (patch) | |
tree | c26fd2c10bc2362d722d97a4b68b331cdd61d57a /tests | |
parent | 7b2d8a23b978f408cc1fe949e23c0aae97ed54a3 (diff) | |
download | cmd2-git-39e74f6b60b8701b14da29693f909ab407242f73.tar.gz |
pylint cleanups
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_parsing.py | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/tests/test_parsing.py b/tests/test_parsing.py index cfc5aa76..eb26c47d 100644 --- a/tests/test_parsing.py +++ b/tests/test_parsing.py @@ -5,20 +5,20 @@ Test the parsing logic in parsing.py Copyright 2017 Todd Leonhardt <todd.leonhardt@gmail.com> Released under MIT license, see LICENSE file """ +import pytest + import cmd2 from cmd2.parsing import StatementParser -import pytest - @pytest.fixture def parser(): parser = StatementParser( allow_redirection=True, - terminators = [';'], - multiline_commands = ['multiline'], - aliases = {'helpalias': 'help', '42': 'theanswer', 'anothermultiline': 'multiline', 'fake': 'pyscript'}, - shortcuts = [('?', 'help'), ('!', 'shell')] + terminators=[';'], + multiline_commands=['multiline'], + aliases={'helpalias': 'help', '42': 'theanswer', 'anothermultiline': 'multiline', 'fake': 'pyscript'}, + shortcuts=[('?', 'help'), ('!', 'shell')] ) return parser @@ -29,9 +29,9 @@ def test_parse_empty_string(parser): assert statement.raw == '' @pytest.mark.parametrize('tokens,command,args', [ - ( [], None, ''), - ( ['command'], 'command', '' ), - ( ['command', 'arg1', 'arg2'], 'command', 'arg1 arg2') + ([], None, ''), + (['command'], 'command', ''), + (['command', 'arg1', 'arg2'], 'command', 'arg1 arg2') ]) def test_command_and_args(parser, tokens, command, args): (parsed_command, parsed_args) = parser._command_and_args(tokens) |