From a0af87e5246aae3cb39ee45aa4ea39408cc9f9e3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Joaqu=C3=ADn=20Cuenca=20Abela?= Date: Tue, 28 Jan 2014 08:48:40 +0100 Subject: [PATCH] Make test_file_jpeg compatible with Python 3 --- Tests/test_file_jpeg.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Tests/test_file_jpeg.py b/Tests/test_file_jpeg.py index de91c2b63..4bb6f1e92 100644 --- a/Tests/test_file_jpeg.py +++ b/Tests/test_file_jpeg.py @@ -138,7 +138,7 @@ def test_progressive_large_buffer(): def test_progressive_large_buffer_highest_quality(): f = tempfile('temp.jpg') a = array.array('B') - a.extend(random.randint(0, 255) for _ in xrange(256 * 256 * 3)) + a.extend(random.randint(0, 255) for _ in range(256 * 256 * 3)) im = Image.frombuffer("RGB", (256, 256), a, "raw", "RGB", 0, 1) # this requires more bytes than pixels in the image im.save(f, format="JPEG", progressive=True, quality=100)