Skip to content

Commit

Permalink
Hide UserWarning in logs
Browse files Browse the repository at this point in the history
Tests/test_file_tiff.py::TestFileTiff::test_oom[Tests/images/oom-225817ca0f8c663be7ab4b9e717b02c661e66834.tif]
  PIL/TiffImagePlugin.py:850: UserWarning: Corrupt EXIF data.  Expecting to read 12 bytes but only got 6. 
    warnings.warn(str(msg))

Co-authored-by: Andrew Murray <[email protected]>
  • Loading branch information
hugovk and radarhere committed Oct 29, 2022
1 parent 05b175e commit 00b25fd
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions Tests/test_file_tiff.py
Original file line number Diff line number Diff line change
Expand Up @@ -867,8 +867,9 @@ def test_timeout(self):
@pytest.mark.timeout(2)
def test_oom(self, test_file):
with pytest.raises(UnidentifiedImageError):
with Image.open(test_file) as im:
pass
with pytest.warns(UserWarning):
with Image.open(test_file) as im:
pass



Expand Down

0 comments on commit 00b25fd

Please sign in to comment.