mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-10-31 16:07:30 +03:00 
			
		
		
		
	Restored original state using finally
Co-authored-by: Ondrej Baranovič <nulano@nulano.eu>
This commit is contained in:
		
							parent
							
								
									8caae8739f
								
							
						
					
					
						commit
						e2d1b2663d
					
				|  | @ -35,7 +35,9 @@ class TestDefaultFontLeak(TestTTypeFontLeak): | |||
|     def test_leak(self): | ||||
|         if features.check_module("freetype2"): | ||||
|             ImageFont.core = _util.DeferredError(ImportError) | ||||
|         default_font = ImageFont.load_default() | ||||
|         ImageFont.core = original_core | ||||
|         try: | ||||
|             default_font = ImageFont.load_default() | ||||
|         finally: | ||||
|             ImageFont.core = original_core | ||||
| 
 | ||||
|         self._test_font(default_font) | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue
	
	Block a user