From 88b45e12b0c2c9e7f8e386504f2d6808f396560b Mon Sep 17 00:00:00 2001 From: Todd Leonhardt Date: Wed, 13 Mar 2019 23:33:58 -0400 Subject: 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 --- tests/test_completion.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'tests/test_completion.py') 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'] -- cgit v1.2.1