diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-01-26 02:05:40 -0500 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-01-26 02:05:40 -0500 |
commit | 1b46090614f8899e7bbe399ee37c1782996e2afe (patch) | |
tree | b306b633ff165afd74dbec821d2480cfeb47626c /tests/test_cmd2.py | |
parent | f67def657d8c3eef9eed57e2a58630675058d8f9 (diff) | |
download | cmd2-git-1b46090614f8899e7bbe399ee37c1782996e2afe.tar.gz |
Fixed the base_show unit test so that it also works on Windows now.
Diffstat (limited to 'tests/test_cmd2.py')
-rw-r--r-- | tests/test_cmd2.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index bd7f2737..194892f7 100644 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -6,7 +6,6 @@ # Released under MIT license, see LICENSE file import mock -import pytest from conftest import run_cmd, _normalize from six import StringIO @@ -72,11 +71,15 @@ def notest_base_(base_app): def test_base_show(base_app): + import sys out = run_cmd(base_app, 'show') + expect_colors = True + if sys.platform.startswith('win'): + expect_colors = False expected = _normalize(""" abbrev: True case_insensitive: True -colors: True +colors: {} continuation_prompt: > debug: False default_file_name: command.txt @@ -85,7 +88,7 @@ feedback_to_output: False prompt: (Cmd) quiet: False timing: False -""") +""".format(expect_colors)) # ignore "editor: vi" (could be others) out = [l for l in out if not l.startswith('editor: ')] assert out == expected |