mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 01:47:47 +03:00 
			
		
		
		
	Merge pull request #4190 from radarhere/ignore-userwarning
Ignore UserWarnings in TestFileTiff::test_string_dimension
This commit is contained in:
		
						commit
						2cf1fee538
					
				| 
						 | 
					@ -2,6 +2,7 @@ import logging
 | 
				
			||||||
import os
 | 
					import os
 | 
				
			||||||
from io import BytesIO
 | 
					from io import BytesIO
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					import pytest
 | 
				
			||||||
from PIL import Image, TiffImagePlugin
 | 
					from PIL import Image, TiffImagePlugin
 | 
				
			||||||
from PIL._util import py3
 | 
					from PIL._util import py3
 | 
				
			||||||
from PIL.TiffImagePlugin import RESOLUTION_UNIT, X_RESOLUTION, Y_RESOLUTION
 | 
					from PIL.TiffImagePlugin import RESOLUTION_UNIT, X_RESOLUTION, Y_RESOLUTION
 | 
				
			||||||
| 
						 | 
					@ -594,6 +595,9 @@ class TestFileTiff(PillowTestCase):
 | 
				
			||||||
            im.load()
 | 
					            im.load()
 | 
				
			||||||
            self.assertFalse(fp.closed)
 | 
					            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):
 | 
					    def test_string_dimension(self):
 | 
				
			||||||
        # Assert that an error is raised if one of the dimensions is a string
 | 
					        # Assert that an error is raised if one of the dimensions is a string
 | 
				
			||||||
        with self.assertRaises(ValueError):
 | 
					        with self.assertRaises(ValueError):
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user