Skip to content

Commit 00b25fd

Browse files
hugovkradarhere
andcommitted
Hide UserWarning in logs
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]>
1 parent 05b175e commit 00b25fd

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Tests/test_file_tiff.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -867,8 +867,9 @@ def test_timeout(self):
867867
@pytest.mark.timeout(2)
868868
def test_oom(self, test_file):
869869
with pytest.raises(UnidentifiedImageError):
870-
with Image.open(test_file) as im:
871-
pass
870+
with pytest.warns(UserWarning):
871+
with Image.open(test_file) as im:
872+
pass
872873

873874

874875

0 commit comments

Comments
 (0)