summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--rl_utils.py2
-rw-r--r--tests/test_autocompletion.py4
2 files changed, 2 insertions, 4 deletions
diff --git a/rl_utils.py b/rl_utils.py
index 11c45ee4..1dc83d15 100644
--- a/rl_utils.py
+++ b/rl_utils.py
@@ -47,6 +47,8 @@ def rl_force_redisplay() -> None:
"""
Causes readline to redraw prompt and input line
"""
+ if not sys.stdout.isatty():
+ return
if rl_type == RlType.GNU:
# rl_forced_update_display() is the proper way to redraw the prompt and line, but we
# have to use ctypes to do it since Python's readline API does not wrap the function
diff --git a/tests/test_autocompletion.py b/tests/test_autocompletion.py
index 7f61f997..bca46794 100644
--- a/tests/test_autocompletion.py
+++ b/tests/test_autocompletion.py
@@ -145,8 +145,6 @@ def test_autocomp_flags(cmd2_app):
assert first_match is not None and \
cmd2_app.completion_matches == ['--duration', '--help', '--type', '-d', '-h', '-t']
-@pytest.mark.skipif(sys.platform == 'win32',
- reason="Unit test doesn't work on win32, but feature does")
def test_autcomp_hint(cmd2_app, capsys):
text = ''
line = 'suggest -d {}'.format(text)
@@ -188,8 +186,6 @@ def test_autocomp_flags_choices(cmd2_app):
cmd2_app.completion_matches == ['movie', 'show']
-@pytest.mark.skipif(sys.platform == 'win32',
- reason="Unit test doesn't work on win32, but feature does")
def test_autcomp_hint_in_narg_range(cmd2_app, capsys):
text = ''
line = 'suggest -d 2 {}'.format(text)