mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-31 07:57:27 +03:00 
			
		
		
		
	Merge pull request #3460 from radarhere/check_png_dos
Corrected TypeError in Python 3
This commit is contained in:
		
						commit
						9eb36da0b8
					
				|  | @ -36,7 +36,7 @@ class TestPngDos(PillowTestCase): | ||||||
| 
 | 
 | ||||||
|     def test_dos_total_memory(self): |     def test_dos_total_memory(self): | ||||||
|         im = Image.new('L', (1, 1)) |         im = Image.new('L', (1, 1)) | ||||||
|         compressed_data = zlib.compress('a'*1024*1023) |         compressed_data = zlib.compress(b'a'*1024*1023) | ||||||
| 
 | 
 | ||||||
|         info = PngImagePlugin.PngInfo() |         info = PngImagePlugin.PngInfo() | ||||||
| 
 | 
 | ||||||
|  |  | ||||||
|  | @ -10,7 +10,9 @@ if __name__ == "__main__": | ||||||
|     print("    f._load_pilfont_data(") |     print("    f._load_pilfont_data(") | ||||||
|     print("         # %s" % os.path.basename(font)) |     print("         # %s" % os.path.basename(font)) | ||||||
|     print("         BytesIO(base64.decodestring(b'''") |     print("         BytesIO(base64.decodestring(b'''") | ||||||
|     base64.encode(open(font + ".pil", "rb"), sys.stdout) |     with open(font + ".pil", "rb") as fp: | ||||||
|  |         print(base64.b64encode(fp.read()).decode()) | ||||||
|     print("''')), Image.open(BytesIO(base64.decodestring(b'''") |     print("''')), Image.open(BytesIO(base64.decodestring(b'''") | ||||||
|     base64.encode(open(font + ".pbm", "rb"), sys.stdout) |     with open(font + ".pbm", "rb") as fp: | ||||||
|  |         print(base64.b64encode(fp.read()).decode()) | ||||||
|     print("'''))))") |     print("'''))))") | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user