forked from josch/img2pdf
cater for python-pil versions without close() attribute (the 2nd fix)
This commit is contained in:
parent
486361e716
commit
b90e385efe
1 changed files with 5 additions and 1 deletions
|
@ -93,7 +93,11 @@ def test_suite():
|
||||||
with open(out, "rb") as outf:
|
with open(out, "rb") as outf:
|
||||||
out = outf.read()
|
out = outf.read()
|
||||||
self.assertEqual(pdf, out)
|
self.assertEqual(pdf, out)
|
||||||
|
# the python-pil version 2.3.0-1ubuntu3 in Ubuntu does not have the close() method
|
||||||
|
try:
|
||||||
orig_img.close()
|
orig_img.close()
|
||||||
|
except AttributeError:
|
||||||
|
pass
|
||||||
setattr(TestImg2Pdf, "test_%s"%test_name, handle)
|
setattr(TestImg2Pdf, "test_%s"%test_name, handle)
|
||||||
|
|
||||||
return unittest.TestSuite((
|
return unittest.TestSuite((
|
||||||
|
|
Loading…
Reference in a new issue