Fix bytes/str and reinstate test

This commit is contained in:
hugovk 2014-05-12 14:45:54 +03:00
parent c37aa0a9ca
commit 8cda5170c8
2 changed files with 7 additions and 14 deletions

View File

@ -105,7 +105,7 @@ def _save(im, fp, filename):
g = i8(palette[i*3+1])
b = i8(palette[i*3+2])
colorspace = colorspace + "%02x%02x%02x " % (r, g, b)
colorspace = colorspace + b"> ]"
colorspace = colorspace + "> ]"
procset = "/ImageI" # indexed color
elif im.mode == "RGB":
filter = "/DCTDecode"

View File

@ -39,19 +39,12 @@ def test_rgb():
helper_save_as_pdf(mode)
# FIXME: P-mode test fails on Python 3.
# https://travis-ci.org/hugovk/Pillow/builds/24915249
# File "/home/travis/build/hugovk/Pillow/PIL/PdfImagePlugin.py", line 108,
# in _save
# colorspace = colorspace + b"> ]"
# TypeError: Can't convert 'bytes' object to str implicitly
#
# def test_p_mode():
# # Arrange
# mode = "P"
#
# # Act / Assert
# helper_save_as_pdf(mode)
def test_p_mode():
# Arrange
mode = "P"
# Act / Assert
helper_save_as_pdf(mode)
def test_cmyk_mode():