summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cmd2/cmd2.py5
-rw-r--r--docs/unfreefeatures.rst5
-rw-r--r--tests/test_cmd2.py17
3 files changed, 9 insertions, 18 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index 0bfc0037..2263d95f 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -567,9 +567,8 @@ class Cmd(cmd.Cmd):
been piped to another process and that process terminates before the
cmd2 command is finished executing.
- :param msg: message to print to current stdout - anything convertible to
- a str with '{}'.format() is OK :param end: string appended after the end
- of the message if not already present, default a newline
+ :param msg: message to print to current stdout - anything convertible to a str with '{}'.format() is OK
+ :param end: string appended after the end of the message if not already present, default a newline
"""
if msg is not None and msg != '':
try:
diff --git a/docs/unfreefeatures.rst b/docs/unfreefeatures.rst
index 795c919e..0124132b 100644
--- a/docs/unfreefeatures.rst
+++ b/docs/unfreefeatures.rst
@@ -165,8 +165,9 @@ The previously recommended ``colorize`` method is now deprecated.
.. _quiet:
-Supressing non-essential output
-===============================
+
+Suppressing non-essential output
+================================
The ``quiet`` setting controls whether ``self.pfeedback()`` actually produces
any output. If ``quiet`` is ``False``, then the output will be produced. If
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py
index 85e6c2f8..6fb64b86 100644
--- a/tests/test_cmd2.py
+++ b/tests/test_cmd2.py
@@ -813,11 +813,7 @@ def test_base_colorize(base_app):
# But if we create a fresh Cmd() instance, it will
fresh_app = cmd2.Cmd()
color_test = fresh_app.colorize('Test', 'red')
- # Actually, colorization only ANSI escape codes is only applied on non-Windows systems
- if sys.platform == 'win32':
- assert color_test == 'Test'
- else:
- assert color_test == '\x1b[31mTest\x1b[39m'
+ assert color_test == '\x1b[31mTest\x1b[39m'
def _expected_no_editor_error():
expected_exception = 'OSError'
@@ -1107,14 +1103,9 @@ def test_ansi_prompt_escaped():
readline_hack_end = "\x02"
readline_safe_prompt = app._surround_ansi_escapes(color_prompt)
- if sys.platform.startswith('win'):
- # colorize() does nothing on Windows due to lack of ANSI color support
- assert prompt == color_prompt
- assert readline_safe_prompt == prompt
- else:
- assert prompt != color_prompt
- assert readline_safe_prompt.startswith(readline_hack_start + app._colorcodes[color][True] + readline_hack_end)
- assert readline_safe_prompt.endswith(readline_hack_start + app._colorcodes[color][False] + readline_hack_end)
+ assert prompt != color_prompt
+ assert readline_safe_prompt.startswith(readline_hack_start + app._colorcodes[color][True] + readline_hack_end)
+ assert readline_safe_prompt.endswith(readline_hack_start + app._colorcodes[color][False] + readline_hack_end)
class HelpApp(cmd2.Cmd):