mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-31 07:57:27 +03:00 
			
		
		
		
	move libtiff-related tests into libtiff test file
This commit is contained in:
		
							parent
							
								
									1f63abdba8
								
							
						
					
					
						commit
						52637a4268
					
				|  | @ -635,6 +635,43 @@ class TestFileLibTiff(LibTiffTestCase): | |||
|         im2 = hopper() | ||||
|         self.assert_image_similar(im, im2, 5) | ||||
| 
 | ||||
|     def test_strip_cmyk_jpeg(self): | ||||
|         infile = "Tests/images/tiff_strip_cmyk_jpeg.tif" | ||||
|         im = Image.open(infile) | ||||
| 
 | ||||
|         self.assert_image_similar_tofile(im, "Tests/images/pil_sample_cmyk.jpg", 3, mode='CMYK') | ||||
| 
 | ||||
|     def test_strip_ycbcr_jpeg_2x2_sampling(self): | ||||
|         infile = "Tests/images/tiff_strip_ycbcr_jpeg_2x2_sampling.tif" | ||||
|         im = Image.open(infile) | ||||
| 
 | ||||
|         self.assert_image_similar_tofile(im, "Tests/images/flower.jpg", 2) | ||||
| 
 | ||||
|     def test_strip_ycbcr_jpeg_1x1_sampling(self): | ||||
|         infile = "Tests/images/tiff_strip_ycbcr_jpeg_1x1_sampling.tif" | ||||
|         im = Image.open(infile) | ||||
| 
 | ||||
|         self.assert_image_similar_tofile(im, "Tests/images/flower.jpg", 5) | ||||
| 
 | ||||
|     def test_tiled_cmyk_jpeg(self): | ||||
|         infile = "Tests/images/tiff_tiled_cmyk_jpeg.tif" | ||||
|         im = Image.open(infile) | ||||
| 
 | ||||
|         self.assert_image_similar_tofile(im, "Tests/images/pil_sample_cmyk.jpg", 3.5, mode='CMYK') | ||||
| 
 | ||||
|     def test_tiled_ycbcr_jpeg_1x1_sampling(self): | ||||
|         infile = "Tests/images/tiff_tiled_ycbcr_jpeg_1x1_sampling.tif" | ||||
|         im = Image.open(infile) | ||||
| 
 | ||||
|         self.assert_image_similar_tofile(im, "Tests/images/flower.jpg", 5) | ||||
| 
 | ||||
|     def test_tiled_ycbcr_jpeg_2x2_sampling(self): | ||||
|         infile = "Tests/images/tiff_tiled_ycbcr_jpeg_2x2_sampling.tif" | ||||
|         im = Image.open(infile) | ||||
| 
 | ||||
|         self.assert_image_similar_tofile(im, "Tests/images/flower.jpg", 1) | ||||
| 
 | ||||
| 
 | ||||
| 
 | ||||
| if __name__ == '__main__': | ||||
|     unittest.main() | ||||
|  |  | |||
|  | @ -422,48 +422,12 @@ class TestFileTiff(PillowTestCase): | |||
| 
 | ||||
|         self.assert_image_equal_tofile(im, "Tests/images/tiff_adobe_deflate.png") | ||||
| 
 | ||||
|     def test_strip_cmyk_jpeg(self): | ||||
|         infile = "Tests/images/tiff_strip_cmyk_jpeg.tif" | ||||
|         im = Image.open(infile) | ||||
| 
 | ||||
|         self.assert_image_similar_tofile(im, "Tests/images/pil_sample_cmyk.jpg", 3, mode='CMYK') | ||||
| 
 | ||||
|     def test_strip_ycbcr_jpeg_2x2_sampling(self): | ||||
|         infile = "Tests/images/tiff_strip_ycbcr_jpeg_2x2_sampling.tif" | ||||
|         im = Image.open(infile) | ||||
| 
 | ||||
|         self.assert_image_similar_tofile(im, "Tests/images/flower.jpg", 2) | ||||
| 
 | ||||
|     def test_strip_ycbcr_jpeg_1x1_sampling(self): | ||||
|         infile = "Tests/images/tiff_strip_ycbcr_jpeg_1x1_sampling.tif" | ||||
|         im = Image.open(infile) | ||||
| 
 | ||||
|         self.assert_image_similar_tofile(im, "Tests/images/flower.jpg", 5) | ||||
| 
 | ||||
|     def test_tiled_raw(self): | ||||
|         infile = "Tests/images/tiff_tiled_raw.tif" | ||||
|         im = Image.open(infile) | ||||
| 
 | ||||
|         self.assert_image_equal_tofile(im, "Tests/images/tiff_adobe_deflate.png") | ||||
| 
 | ||||
|     def test_tiled_cmyk_jpeg(self): | ||||
|         infile = "Tests/images/tiff_tiled_cmyk_jpeg.tif" | ||||
|         im = Image.open(infile) | ||||
| 
 | ||||
|         self.assert_image_similar_tofile(im, "Tests/images/pil_sample_cmyk.jpg", 3.5, mode='CMYK') | ||||
| 
 | ||||
|     def test_tiled_ycbcr_jpeg_1x1_sampling(self): | ||||
|         infile = "Tests/images/tiff_tiled_ycbcr_jpeg_1x1_sampling.tif" | ||||
|         im = Image.open(infile) | ||||
| 
 | ||||
|         self.assert_image_similar_tofile(im, "Tests/images/flower.jpg", 5) | ||||
| 
 | ||||
|     def test_tiled_ycbcr_jpeg_2x2_sampling(self): | ||||
|         infile = "Tests/images/tiff_tiled_ycbcr_jpeg_2x2_sampling.tif" | ||||
|         im = Image.open(infile) | ||||
| 
 | ||||
|         self.assert_image_similar_tofile(im, "Tests/images/flower.jpg", 1) | ||||
| 
 | ||||
|     def test_tiff_save_all(self): | ||||
|         import io | ||||
|         import os | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user