From 7947d0d7b76f690fcb1b47633f5965f2ac7a1fde Mon Sep 17 00:00:00 2001 From: cgohlke Date: Sun, 13 Jul 2014 12:50:14 -0700 Subject: [PATCH 1/2] TST: Fix test_backend_ps failures on Windows --- lib/matplotlib/tests/test_backend_ps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/tests/test_backend_ps.py b/lib/matplotlib/tests/test_backend_ps.py index a8133e9a4c6b..4d331ddc36c9 100644 --- a/lib/matplotlib/tests/test_backend_ps.py +++ b/lib/matplotlib/tests/test_backend_ps.py @@ -39,7 +39,7 @@ def _test_savefig_to_stringio(format='ps'): values = [re.sub(b'%%.*?\n', b'', x) for x in values] assert values[0] == values[1] - assert values[1] == values[2] + assert values[1] == values[2].replace('\r\n', '\n') @cleanup From 3f156ae2987d1ee2d471f53c07a9c659153b5799 Mon Sep 17 00:00:00 2001 From: cgohlke Date: Sun, 13 Jul 2014 13:39:32 -0700 Subject: [PATCH 2/2] TST: fix test errors on Python 3 --- lib/matplotlib/tests/test_backend_ps.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/matplotlib/tests/test_backend_ps.py b/lib/matplotlib/tests/test_backend_ps.py index 4d331ddc36c9..1b6aac6e37e5 100644 --- a/lib/matplotlib/tests/test_backend_ps.py +++ b/lib/matplotlib/tests/test_backend_ps.py @@ -39,7 +39,7 @@ def _test_savefig_to_stringio(format='ps'): values = [re.sub(b'%%.*?\n', b'', x) for x in values] assert values[0] == values[1] - assert values[1] == values[2].replace('\r\n', '\n') + assert values[1] == values[2].replace(b'\r\n', b'\n') @cleanup