diff options
author | Graham Mainwaring <gmainwaring@ansible.com> | 2020-03-27 20:10:38 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-03-27 17:10:38 -0700 |
commit | 206813158967aa654e2a13e5e699b8f49977eb2b (patch) | |
tree | 56e43430c0964545e0fd2c332c15026834aefced /test | |
parent | 53a3d1ffdb14a7f367945606d6ca240d47fe5e04 (diff) | |
download | ansible-206813158967aa654e2a13e5e699b8f49977eb2b.tar.gz |
Fix colorization to not extend across newline boundary (#68517)
* Fix colorization to not extend across newline boundary
* Fix unit test to look for the newline outside the coloration
* Add changelog fragment
Diffstat (limited to 'test')
-rw-r--r-- | test/units/utils/display/test_warning.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/test/units/utils/display/test_warning.py b/test/units/utils/display/test_warning.py index 2183005a0f..be63c348bc 100644 --- a/test/units/utils/display/test_warning.py +++ b/test/units/utils/display/test_warning.py @@ -27,7 +27,7 @@ def test_warning(capsys, mocker, warning_message): d.warning(warning_message) out, err = capsys.readouterr() assert d._warns == {expected_warning_message: 1} - assert err == '\x1b[1;35m{0}\x1b[0m\n\x1b[1;35m\x1b[0m'.format(expected_warning_message.rstrip('\n')) + assert err == '\x1b[1;35m{0}\x1b[0m\n'.format(expected_warning_message.rstrip('\n')) def test_warning_no_color(capsys, mocker, warning_message): |