From 6520004289648e3611d43fab7190751f18912aef Mon Sep 17 00:00:00 2001 From: hugovk Date: Sun, 11 May 2014 17:35:49 +0300 Subject: [PATCH] Add monochrome PDF test --- Tests/test_file_pdf.py | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Tests/test_file_pdf.py b/Tests/test_file_pdf.py index 4bc70d10c..ed6b50b5d 100644 --- a/Tests/test_file_pdf.py +++ b/Tests/test_file_pdf.py @@ -15,6 +15,14 @@ def helper_save_as_pdf(mode): assert_greater(os.path.getsize(outfile), 0) +def test_monochrome(): + # Arrange + mode = "1" + + # Act / Assert + helper_save_as_pdf(mode) + + def test_greyscale(): # Arrange mode = "L" @@ -33,9 +41,11 @@ def test_rgb(): # 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 +# 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"