summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rwxr-xr-x[-rw-r--r--]tests/test_cmd2.py2
-rwxr-xr-x[-rw-r--r--]tests/test_completion.py15
-rwxr-xr-x[-rw-r--r--]tests/test_history.py1
-rwxr-xr-x[-rw-r--r--]tests/test_parsing.py1
4 files changed, 1 insertions, 18 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py
index 16c5eed4..8389b9ed 100644..100755
--- a/tests/test_cmd2.py
+++ b/tests/test_cmd2.py
@@ -558,7 +558,7 @@ def test_feedback_to_output_false(base_app):
def test_disallow_redirection(base_app):
# Set allow_redirection to False
- base_app.statement_parser.allow_redirection = False
+ base_app.allow_redirection = False
filename = 'test_allow_redirect.txt'
diff --git a/tests/test_completion.py b/tests/test_completion.py
index 59fe04d1..dcca1c7d 100644..100755
--- a/tests/test_completion.py
+++ b/tests/test_completion.py
@@ -695,7 +695,6 @@ def test_tokens_for_completion_redirect(cmd2_app):
endidx = len(line)
begidx = endidx - len(text)
- cmd2_app.allow_redirection = True
expected_tokens = ['command', '|', '<', '>>', 'file']
expected_raw_tokens = ['command', '|', '<', '>>', 'file']
@@ -717,20 +716,6 @@ def test_tokens_for_completion_quoted_redirect(cmd2_app):
assert expected_tokens == tokens
assert expected_raw_tokens == raw_tokens
-def test_tokens_for_completion_redirect_off(cmd2_app):
- text = '>file'
- line = 'command {}'.format(text)
- endidx = len(line)
- begidx = endidx - len(text)
-
- cmd2_app.statement_parser.allow_redirection = False
- expected_tokens = ['command', '>file']
- expected_raw_tokens = ['command', '>file']
-
- tokens, raw_tokens = cmd2_app.tokens_for_completion(line, begidx, endidx)
- assert expected_tokens == tokens
- assert expected_raw_tokens == raw_tokens
-
def test_add_opening_quote_basic_no_text(cmd2_app):
text = ''
line = 'test_basic {}'.format(text)
diff --git a/tests/test_history.py b/tests/test_history.py
index 9752ed07..476cdd7e 100644..100755
--- a/tests/test_history.py
+++ b/tests/test_history.py
@@ -268,7 +268,6 @@ def histitem():
def parser():
from cmd2.parsing import StatementParser
parser = StatementParser(
- allow_redirection=True,
terminators=[';', '&'],
multiline_commands=['multiline'],
aliases={'helpalias': 'help',
diff --git a/tests/test_parsing.py b/tests/test_parsing.py
index a629d9fa..ac540183 100644..100755
--- a/tests/test_parsing.py
+++ b/tests/test_parsing.py
@@ -13,7 +13,6 @@ from cmd2.parsing import StatementParser, shlex_split
@pytest.fixture
def parser():
parser = StatementParser(
- allow_redirection=True,
terminators=[';', '&'],
multiline_commands=['multiline'],
aliases={'helpalias': 'help',