diff options
| author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-02-04 17:36:20 -0500 |
|---|---|---|
| committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2017-02-04 17:36:20 -0500 |
| commit | 696542a7fe7248b403da2833d2a41b15b4c4b750 (patch) | |
| tree | 495efc0befafc432236289788b1feae22b6006cc /tests/test_cmd2.py | |
| parent | ffc4da088ecd7bee4f1f3822c35d906b67f3d0f7 (diff) | |
| download | cmd2-git-696542a7fe7248b403da2833d2a41b15b4c4b750.tar.gz | |
Fix to colorize unit test for Windows
Diffstat (limited to 'tests/test_cmd2.py')
| -rw-r--r-- | tests/test_cmd2.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/tests/test_cmd2.py b/tests/test_cmd2.py index a663c164..83a3b9cf 100644 --- a/tests/test_cmd2.py +++ b/tests/test_cmd2.py @@ -352,5 +352,9 @@ 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') - assert color_test == '\x1b[31mTest\x1b[39m' + # Actually, colorization only ANSI escape codes is only applied on non-Windows systems + if sys.platform == 'win32': + assert out.startswith('Elapsed: 0:00:00') + else: + assert color_test == '\x1b[31mTest\x1b[39m' |
