diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-03-13 23:33:58 -0400 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-03-13 23:33:58 -0400 |
commit | 88b45e12b0c2c9e7f8e386504f2d6808f396560b (patch) | |
tree | 66209a092dc11528f73a9cb1a991c620be09a815 /tests/test_completion.py | |
parent | 23fad46d5187600d52b95125bb1629e491cb9e6f (diff) | |
download | cmd2-git-88b45e12b0c2c9e7f8e386504f2d6808f396560b.tar.gz |
First stage of attribute refactoring
The following are now arguments to cmd2.Cmd.__init__() instead of class attributes:
* allow_redirection
* multiline_commands
* terminators
* shortcuts
Added a couple read-only properties for convenience of cmd2.Cmd accessing immutable members from self.statement_parser
Diffstat (limited to 'tests/test_completion.py')
-rw-r--r-- | tests/test_completion.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/test_completion.py b/tests/test_completion.py index da7fae65..a7c26928 100644 --- a/tests/test_completion.py +++ b/tests/test_completion.py @@ -635,7 +635,7 @@ def test_tokens_for_completion_redirect(cmd2_app): endidx = len(line) begidx = endidx - len(text) - cmd2_app.allow_redirection = True + cmd2_app.statement_parser.allow_redirection = True expected_tokens = ['command', '|', '<', '>>', 'file'] expected_raw_tokens = ['command', '|', '<', '>>', 'file'] @@ -649,7 +649,7 @@ def test_tokens_for_completion_quoted_redirect(cmd2_app): endidx = len(line) begidx = endidx - len(text) - cmd2_app.allow_redirection = True + cmd2_app.statement_parser.redirection = True expected_tokens = ['command', '>file'] expected_raw_tokens = ['command', '">file'] @@ -663,7 +663,7 @@ def test_tokens_for_completion_redirect_off(cmd2_app): endidx = len(line) begidx = endidx - len(text) - cmd2_app.allow_redirection = False + cmd2_app.statement_parser.allow_redirection = False expected_tokens = ['command', '>file'] expected_raw_tokens = ['command', '>file'] |