mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-31 07:57:27 +03:00 
			
		
		
		
	Added test
This commit is contained in:
		
							parent
							
								
									56d630294c
								
							
						
					
					
						commit
						ddb0a6393f
					
				|  | @ -88,6 +88,17 @@ class TestImage: | ||||||
|         # with pytest.raises(MemoryError): |         # with pytest.raises(MemoryError): | ||||||
|         #   Image.new("L", (1000000, 1000000)) |         #   Image.new("L", (1000000, 1000000)) | ||||||
| 
 | 
 | ||||||
|  |     def test_repr_pretty(self): | ||||||
|  |         class Pretty: | ||||||
|  |             def text(self, text): | ||||||
|  |                 self.pretty_output = text | ||||||
|  | 
 | ||||||
|  |         im = Image.new("L", (100, 100)) | ||||||
|  | 
 | ||||||
|  |         p = Pretty() | ||||||
|  |         im._repr_pretty_(p, None) | ||||||
|  |         assert p.pretty_output == "<PIL.Image.Image image mode=L size=100x100>" | ||||||
|  | 
 | ||||||
|     def test_open_formats(self): |     def test_open_formats(self): | ||||||
|         PNGFILE = "Tests/images/hopper.png" |         PNGFILE = "Tests/images/hopper.png" | ||||||
|         JPGFILE = "Tests/images/hopper.jpg" |         JPGFILE = "Tests/images/hopper.jpg" | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user