summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuke Plant <L.Plant.98@cantab.net>2010-10-07 23:49:31 +0000
committerLuke Plant <L.Plant.98@cantab.net>2010-10-07 23:49:31 +0000
commitcf1d9f4b2cb30e8eb29b29714df592a31ddedcfa (patch)
tree4a61a91cc9e9c591f24043bb9acd75d26d3088ca
parent01b12a6fab25a9891085acc718d52e033188d7e7 (diff)
[1.2.X] Fixed #14430 - Test failure on Windows with get_image_dimensions since [13715]
Thanks to gabrielhurley for report and patch. Backport of [14001] from trunk. git-svn-id: http://code.djangoproject.com/svn/django/branches/releases/1.2.X@14002 bcc190cf-cafb-0310-a4f2-bffc1f526a37
-rw-r--r--tests/regressiontests/file_storage/tests.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/regressiontests/file_storage/tests.py b/tests/regressiontests/file_storage/tests.py
index d59fe9c307..46411aca87 100644
--- a/tests/regressiontests/file_storage/tests.py
+++ b/tests/regressiontests/file_storage/tests.py
@@ -375,7 +375,7 @@ if Image is not None:
"""
from django.core.files.images import ImageFile
img_path = os.path.join(os.path.dirname(__file__), "test.png")
- image = ImageFile(open(img_path))
+ image = ImageFile(open(img_path, 'rb'))
image_pil = Image.open(img_path)
size_1, size_2 = get_image_dimensions(image), get_image_dimensions(image)
self.assertEqual(image_pil.size, size_1)