From 0477c9dfebfd76b5ca9bcc15c7d2c83865c8b909 Mon Sep 17 00:00:00 2001 From: cgohlke Date: Sat, 29 Sep 2012 14:20:11 -0700 Subject: [PATCH] Open image files in default binary write mode Fixes test failure on Windows --- skimage/io/tests/test_pil.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/skimage/io/tests/test_pil.py b/skimage/io/tests/test_pil.py index fa62e1dd..a9d986d6 100644 --- a/skimage/io/tests/test_pil.py +++ b/skimage/io/tests/test_pil.py @@ -85,7 +85,7 @@ def test_repr_png(): original_img = imread(img_path) original_img_str = original_img._repr_png_() - with NamedTemporaryFile(suffix='.png', mode='r+') as temp_png: + with NamedTemporaryFile(suffix='.png') as temp_png: temp_png.write(original_img_str) temp_png.seek(0) round_trip = imread(temp_png)