mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-31 16:07:30 +03:00 
			
		
		
		
	Do not repeatedly save to the same path
This commit is contained in:
		
							parent
							
								
									2d1d801ec0
								
							
						
					
					
						commit
						624848ff97
					
				|  | @ -543,10 +543,10 @@ class TestFileJpeg: | |||
|     ) | ||||
|     def test_qtables(self, tmp_path: Path) -> None: | ||||
|         def _n_qtables_helper(n: int, test_file: str) -> None: | ||||
|             b = BytesIO() | ||||
|             with Image.open(test_file) as im: | ||||
|                 f = str(tmp_path / "temp.jpg") | ||||
|                 im.save(f, qtables=[[n] * 64] * n) | ||||
|             with Image.open(f) as im: | ||||
|                 im.save(b, "JPEG", qtables=[[n] * 64] * n) | ||||
|             with Image.open(b) as im: | ||||
|                 assert len(im.quantization) == n | ||||
|                 reloaded = self.roundtrip(im, qtables="keep") | ||||
|                 assert im.quantization == reloaded.quantization | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user