diff options
author | James R. Barlow <jim@purplerock.ca> | 2019-02-10 21:52:43 -0800 |
---|---|---|
committer | James R. Barlow <jim@purplerock.ca> | 2019-02-10 21:52:43 -0800 |
commit | 2cfe38690ac22f140be00973292d9cfb4f320361 (patch) | |
tree | 6e96bf3cb985fac3e4545ef6885632730d9cdf72 /tests | |
parent | f82eba7045733fb4eeccdc3ba7631ab3ba9f0a71 (diff) |
Remove use of imghdr library
imghdr is almost certainly on the chopping block for stdlib removal.
Diffstat (limited to 'tests')
-rw-r--r-- | tests/test_image_access.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/test_image_access.py b/tests/test_image_access.py index 30a055e..65a7992 100644 --- a/tests/test_image_access.py +++ b/tests/test_image_access.py @@ -1,4 +1,3 @@ -import imghdr import zlib from io import BytesIO @@ -71,7 +70,8 @@ def test_lowlevel_jpeg(congress): with pytest.raises(PdfError): congress[0].read_bytes() - assert imghdr.what('', h=raw_bytes) == 'jpeg' + im = Image.open(BytesIO(raw_bytes)) + assert im.format == 'JPEG' pim = PdfImage(congress[0]) b = BytesIO() |