mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-30 23:47: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]) | ||||
|             b = i8(palette[i*3+2]) | ||||
|             colorspace = colorspace + "%02x%02x%02x " % (r, g, b) | ||||
|         colorspace = colorspace + b"> ]" | ||||
|         colorspace = colorspace + "> ]" | ||||
|         procset = "/ImageI" # indexed color | ||||
|     elif im.mode == "RGB": | ||||
|         filter = "/DCTDecode" | ||||
|  |  | |||
|  | @ -39,19 +39,12 @@ def test_rgb(): | |||
|     helper_save_as_pdf(mode) | ||||
| 
 | ||||
| 
 | ||||
| # FIXME: P-mode test fails on Python 3. | ||||
| # https://travis-ci.org/hugovk/Pillow/builds/24915249 | ||||
| #   File "/home/travis/build/hugovk/Pillow/PIL/PdfImagePlugin.py", line 108, | ||||
| #   in _save | ||||
| #     colorspace = colorspace + b"> ]" | ||||
| # TypeError: Can't convert 'bytes' object to str implicitly | ||||
| # | ||||
| # def test_p_mode(): | ||||
| #     # Arrange | ||||
| #     mode = "P" | ||||
| # | ||||
| #     # Act / Assert | ||||
| #     helper_save_as_pdf(mode) | ||||
| def test_p_mode(): | ||||
|     # Arrange | ||||
|     mode = "P" | ||||
| 
 | ||||
|     # Act / Assert | ||||
|     helper_save_as_pdf(mode) | ||||
| 
 | ||||
| 
 | ||||
| def test_cmyk_mode(): | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user