mirror of
https://github.com/python-pillow/Pillow.git
synced 2025-01-26 17:24:31 +03:00
Merge pull request #341 from cgohlke/patch-4
TST: fix TypeError: string argument expected, got 'bytes' on Py3
This commit is contained in:
commit
2d4fec1cfb
|
@ -9,10 +9,6 @@ try:
|
|||
except:
|
||||
skip('webp support not installed')
|
||||
|
||||
try:
|
||||
from StringIO import StringIO
|
||||
except ImportError:
|
||||
from io import StringIO
|
||||
|
||||
|
||||
def test_read_exif_metadata():
|
||||
|
@ -40,7 +36,7 @@ def test_write_exif_metadata():
|
|||
image = Image.open(file_path)
|
||||
expected_exif = image.info['exif']
|
||||
|
||||
buffer = StringIO()
|
||||
buffer = BytesIO()
|
||||
|
||||
image.save(buffer, "webp", exif=expected_exif)
|
||||
|
||||
|
@ -73,7 +69,7 @@ def test_write_icc_metadata():
|
|||
image = Image.open(file_path)
|
||||
expected_icc_profile = image.info['icc_profile']
|
||||
|
||||
buffer = StringIO()
|
||||
buffer = BytesIO()
|
||||
|
||||
image.save(buffer, "webp", icc_profile=expected_icc_profile)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user