mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 09:57:43 +03:00 
			
		
		
		
	Replace lena with hopper
This commit is contained in:
		
							parent
							
								
									a5fc5e3e7e
								
							
						
					
					
						commit
						91aa29ca2b
					
				| 
						 | 
					@ -36,7 +36,7 @@ class TestFileLibTiff(LibTiffTestCase):
 | 
				
			||||||
    def test_g4_tiff(self):
 | 
					    def test_g4_tiff(self):
 | 
				
			||||||
        """Test the ordinary file path load path"""
 | 
					        """Test the ordinary file path load path"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        file = "Tests/images/lena_g4_500.tif"
 | 
					        file = "Tests/images/hopper_g4_500.tif"
 | 
				
			||||||
        im = Image.open(file)
 | 
					        im = Image.open(file)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.assertEqual(im.size, (500, 500))
 | 
					        self.assertEqual(im.size, (500, 500))
 | 
				
			||||||
| 
						 | 
					@ -50,7 +50,7 @@ class TestFileLibTiff(LibTiffTestCase):
 | 
				
			||||||
    def test_g4_tiff_file(self):
 | 
					    def test_g4_tiff_file(self):
 | 
				
			||||||
        """Testing the string load path"""
 | 
					        """Testing the string load path"""
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        file = "Tests/images/lena_g4_500.tif"
 | 
					        file = "Tests/images/hopper_g4_500.tif"
 | 
				
			||||||
        with open(file, 'rb') as f:
 | 
					        with open(file, 'rb') as f:
 | 
				
			||||||
            im = Image.open(f)
 | 
					            im = Image.open(f)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -60,7 +60,7 @@ class TestFileLibTiff(LibTiffTestCase):
 | 
				
			||||||
    def test_g4_tiff_bytesio(self):
 | 
					    def test_g4_tiff_bytesio(self):
 | 
				
			||||||
        """Testing the stringio loading code path"""
 | 
					        """Testing the stringio loading code path"""
 | 
				
			||||||
        from io import BytesIO
 | 
					        from io import BytesIO
 | 
				
			||||||
        file = "Tests/images/lena_g4_500.tif"
 | 
					        file = "Tests/images/hopper_g4_500.tif"
 | 
				
			||||||
        s = BytesIO()
 | 
					        s = BytesIO()
 | 
				
			||||||
        with open(file, 'rb') as f:
 | 
					        with open(file, 'rb') as f:
 | 
				
			||||||
            s.write(f.read())
 | 
					            s.write(f.read())
 | 
				
			||||||
| 
						 | 
					@ -72,8 +72,8 @@ class TestFileLibTiff(LibTiffTestCase):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_g4_eq_png(self):
 | 
					    def test_g4_eq_png(self):
 | 
				
			||||||
        """ Checking that we're actually getting the data that we expect"""
 | 
					        """ Checking that we're actually getting the data that we expect"""
 | 
				
			||||||
        png = Image.open('Tests/images/lena_bw_500.png')
 | 
					        png = Image.open('Tests/images/hopper_bw_500.png')
 | 
				
			||||||
        g4 = Image.open('Tests/images/lena_g4_500.tif')
 | 
					        g4 = Image.open('Tests/images/hopper_g4_500.tif')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        self.assert_image_equal(g4, png)
 | 
					        self.assert_image_equal(g4, png)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -87,7 +87,7 @@ class TestFileLibTiff(LibTiffTestCase):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_g4_write(self):
 | 
					    def test_g4_write(self):
 | 
				
			||||||
        """Checking to see that the saved image is the same as what we wrote"""
 | 
					        """Checking to see that the saved image is the same as what we wrote"""
 | 
				
			||||||
        file = "Tests/images/lena_g4_500.tif"
 | 
					        file = "Tests/images/hopper_g4_500.tif"
 | 
				
			||||||
        orig = Image.open(file)
 | 
					        orig = Image.open(file)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        out = self.tempfile("temp.tif")
 | 
					        out = self.tempfile("temp.tif")
 | 
				
			||||||
| 
						 | 
					@ -156,7 +156,7 @@ class TestFileLibTiff(LibTiffTestCase):
 | 
				
			||||||
                        value, reloaded[tag], "%s didn't roundtrip" % tag)
 | 
					                        value, reloaded[tag], "%s didn't roundtrip" % tag)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_g3_compression(self):
 | 
					    def test_g3_compression(self):
 | 
				
			||||||
        i = Image.open('Tests/images/lena_g4_500.tif')
 | 
					        i = Image.open('Tests/images/hopper_g4_500.tif')
 | 
				
			||||||
        out = self.tempfile("temp.tif")
 | 
					        out = self.tempfile("temp.tif")
 | 
				
			||||||
        i.save(out, compression='group3')
 | 
					        i.save(out, compression='group3')
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					@ -213,7 +213,7 @@ class TestFileLibTiff(LibTiffTestCase):
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_g4_string_info(self):
 | 
					    def test_g4_string_info(self):
 | 
				
			||||||
        """Tests String data in info directory"""
 | 
					        """Tests String data in info directory"""
 | 
				
			||||||
        file = "Tests/images/lena_g4_500.tif"
 | 
					        file = "Tests/images/hopper_g4_500.tif"
 | 
				
			||||||
        orig = Image.open(file)
 | 
					        orig = Image.open(file)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        out = self.tempfile("temp.tif")
 | 
					        out = self.tempfile("temp.tif")
 | 
				
			||||||
| 
						 | 
					@ -302,7 +302,7 @@ class TestFileLibTiff(LibTiffTestCase):
 | 
				
			||||||
        self.assertRaises(IOError, lambda: im.save(out, compression='group4'))
 | 
					        self.assertRaises(IOError, lambda: im.save(out, compression='group4'))
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    def test_fp_leak(self):
 | 
					    def test_fp_leak(self):
 | 
				
			||||||
        im = Image.open("Tests/images/lena_g4_500.tif")
 | 
					        im = Image.open("Tests/images/hopper_g4_500.tif")
 | 
				
			||||||
        fn = im.fp.fileno()
 | 
					        fn = im.fp.fileno()
 | 
				
			||||||
 | 
					
 | 
				
			||||||
        os.fstat(fn)
 | 
					        os.fstat(fn)
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user