mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-31 07:57:27 +03:00 
			
		
		
		
	Fix bytes/str and reinstate test
This commit is contained in:
		
							parent
							
								
									c37aa0a9ca
								
							
						
					
					
						commit
						8cda5170c8
					
				|  | @ -105,7 +105,7 @@ def _save(im, fp, filename): | ||||||
|             g = i8(palette[i*3+1]) |             g = i8(palette[i*3+1]) | ||||||
|             b = i8(palette[i*3+2]) |             b = i8(palette[i*3+2]) | ||||||
|             colorspace = colorspace + "%02x%02x%02x " % (r, g, b) |             colorspace = colorspace + "%02x%02x%02x " % (r, g, b) | ||||||
|         colorspace = colorspace + b"> ]" |         colorspace = colorspace + "> ]" | ||||||
|         procset = "/ImageI" # indexed color |         procset = "/ImageI" # indexed color | ||||||
|     elif im.mode == "RGB": |     elif im.mode == "RGB": | ||||||
|         filter = "/DCTDecode" |         filter = "/DCTDecode" | ||||||
|  |  | ||||||
|  | @ -39,19 +39,12 @@ def test_rgb(): | ||||||
|     helper_save_as_pdf(mode) |     helper_save_as_pdf(mode) | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| # FIXME: P-mode test fails on Python 3. | def test_p_mode(): | ||||||
| # https://travis-ci.org/hugovk/Pillow/builds/24915249 |     # Arrange | ||||||
| #   File "/home/travis/build/hugovk/Pillow/PIL/PdfImagePlugin.py", line 108, |     mode = "P" | ||||||
| #   in _save | 
 | ||||||
| #     colorspace = colorspace + b"> ]" |     # Act / Assert | ||||||
| # TypeError: Can't convert 'bytes' object to str implicitly |     helper_save_as_pdf(mode) | ||||||
| # |  | ||||||
| # def test_p_mode(): |  | ||||||
| #     # Arrange |  | ||||||
| #     mode = "P" |  | ||||||
| # |  | ||||||
| #     # Act / Assert |  | ||||||
| #     helper_save_as_pdf(mode) |  | ||||||
| 
 | 
 | ||||||
| 
 | 
 | ||||||
| def test_cmyk_mode(): | def test_cmyk_mode(): | ||||||
|  |  | ||||||
		Loading…
	
		Reference in New Issue
	
	Block a user