diff options
author | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2017-01-25 18:36:43 +0100 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2017-01-25 18:51:09 +0100 |
commit | d24f76c98e9673d4c66121c007080a62a0998569 (patch) | |
tree | 4e2482970ac6cfae00fe4ea3b999a425e7c1a189 /test | |
parent | 5549757268aad564316a279dedacb325e2660cf2 (diff) | |
download | mitmproxy-d24f76c98e9673d4c66121c007080a62a0998569.tar.gz mitmproxy-d24f76c98e9673d4c66121c007080a62a0998569.tar.bz2 mitmproxy-d24f76c98e9673d4c66121c007080a62a0998569.zip |
fix newlines on windows
Diffstat (limited to 'test')
-rw-r--r-- | test/mitmproxy/addons/test_termlog.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/test/mitmproxy/addons/test_termlog.py b/test/mitmproxy/addons/test_termlog.py index e21aecec..70c3a7f2 100644 --- a/test/mitmproxy/addons/test_termlog.py +++ b/test/mitmproxy/addons/test_termlog.py @@ -10,9 +10,9 @@ from mitmproxy.test import taddons class TestTermLog: @pytest.mark.usefixtures('capfd') @pytest.mark.parametrize('outfile, expected_out, expected_err', [ - (None, 'one\nthree\n', 'four\n'), - (sys.stdout, 'one\nthree\nfour\n', ''), - (sys.stderr, '', 'one\nthree\nfour\n'), + (None, ['one', 'three'], ['four']), + (sys.stdout, ['one', 'three', 'four'], []), + (sys.stderr, [], ['one', 'three', 'four']), ]) def test_output(self, outfile, expected_out, expected_err, capfd): t = termlog.TermLog(outfile=outfile) @@ -23,5 +23,5 @@ class TestTermLog: t.log(log.LogEntry("three", "warn")) t.log(log.LogEntry("four", "error")) out, err = capfd.readouterr() - assert out == expected_out - assert err == expected_err + assert out.strip().splitlines() == expected_out + assert err.strip().splitlines() == expected_err |