From b1ee44a74b0552c1d83fe9988687159ad915580b Mon Sep 17 00:00:00 2001 From: Andrew Murray Date: Sat, 2 Nov 2019 18:10:55 +1100 Subject: [PATCH] Ignore UserWarnings --- Tests/test_file_tiff.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/Tests/test_file_tiff.py b/Tests/test_file_tiff.py index ccaa91920..146bf1851 100644 --- a/Tests/test_file_tiff.py +++ b/Tests/test_file_tiff.py @@ -2,6 +2,7 @@ import logging import os from io import BytesIO +import pytest from PIL import Image, TiffImagePlugin from PIL._util import py3 from PIL.TiffImagePlugin import RESOLUTION_UNIT, X_RESOLUTION, Y_RESOLUTION @@ -594,6 +595,9 @@ class TestFileTiff(PillowTestCase): im.load() self.assertFalse(fp.closed) + # Ignore this UserWarning which triggers for four tags: + # "Possibly corrupt EXIF data. Expecting to read 50404352 bytes but..." + @pytest.mark.filterwarnings("ignore:Possibly corrupt EXIF data") def test_string_dimension(self): # Assert that an error is raised if one of the dimensions is a string with self.assertRaises(ValueError):