diff options
| author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-02-04 19:34:24 -0500 |
|---|---|---|
| committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-02-04 19:34:24 -0500 |
| commit | 67d0d01a2bac0c3cf1b3ea6aead2f44451420d03 (patch) | |
| tree | 860559e6467121ea3af7337b112ec273068657a1 | |
| parent | 4bec7b5f7861d0a7e12a6abf32004b5ffaf565ee (diff) | |
| download | cmd2-git-67d0d01a2bac0c3cf1b3ea6aead2f44451420d03.tar.gz | |
Fixed long-form show unit test to deal with Windows not having colors.
| -rw-r--r-- | tests/conftest.py | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/conftest.py b/tests/conftest.py index a2f79579..7bbefd6d 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -64,10 +64,13 @@ quiet: False timing: False """.format(expect_colors) - +if expect_colors: + color_str = 'True ' +else: + color_str = 'False' SHOW_LONG = """abbrev: True # Accept abbreviated commands case_insensitive: True # upper- and lower-case both OK -colors: True # Colorized output (*nix only) +colors: {} # Colorized output (*nix only) continuation_prompt: > # On 2nd+ line of input debug: False # Show full error stack on error default_file_name: command.txt # for ``save``, ``load``, etc. @@ -77,7 +80,7 @@ feedback_to_output: False # include nonessentials in `|`, `>` results prompt: (Cmd) # quiet: False # Don't print nonessential feedback timing: False # Report execution times -""" +""".format(color_str) class StdOut(object): |
