From e071f062cf73c1666349d6bba17e6a4d0c9b5849 Mon Sep 17 00:00:00 2001 From: Christoph Gohlke Date: Wed, 13 Mar 2013 19:31:37 -0700 Subject: [PATCH] Fix g4_tiff test on Python 3 --- Tests/test_file_tiff.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py index 47101883d..45b00d36a 100644 --- a/Tests/test_file_tiff.py +++ b/Tests/test_file_tiff.py @@ -2,7 +2,7 @@ from tester import * from PIL import Image -import StringIO +from io import BytesIO import random def test_sanity(): @@ -106,7 +106,7 @@ def test_g4_tiff_stringio(): """Testing the stringio loading code path""" file = "Tests/images/lena_g4_500.tif" - s = StringIO.StringIO() + s = BytesIO() with open(file,'rb') as f: s.write(f.read()) s.seek(0)