From be3be537e6672b6d5e4769db4dd36bc0310ce82d Mon Sep 17 00:00:00 2001 From: cgohlke Date: Thu, 10 Oct 2013 21:22:40 -0700 Subject: [PATCH] TST: use BytesIO to save images into file-like object StringIO does not work on Python 3 --- skimage/io/tests/test_pil.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/skimage/io/tests/test_pil.py b/skimage/io/tests/test_pil.py index 61ec5ce3..aa582ebc 100644 --- a/skimage/io/tests/test_pil.py +++ b/skimage/io/tests/test_pil.py @@ -8,7 +8,7 @@ from tempfile import NamedTemporaryFile from skimage import data_dir from skimage.io import (imread, imsave, use_plugin, reset_plugins, Image as ioImage) -from skimage._shared.six.moves import StringIO +from skimage._shared.six import BytesIO try: @@ -132,7 +132,7 @@ class TestSave: def test_imsave_filelike(): shape = (2, 2) image = np.zeros(shape) - s = StringIO() + s = BytesIO() # save to file-like object imsave(s, image)