mirror of
				https://github.com/python-pillow/Pillow.git
				synced 2025-11-04 09:57:43 +03:00 
			
		
		
		
	Fixed restoring original state
This commit is contained in:
		
							parent
							
								
									b602f365ae
								
							
						
					
					
						commit
						cbf0bf1010
					
				| 
						 | 
					@ -35,6 +35,7 @@ def test_register_handler(tmp_path):
 | 
				
			||||||
            self.methodCalled = True
 | 
					            self.methodCalled = True
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    handler = TestHandler()
 | 
					    handler = TestHandler()
 | 
				
			||||||
 | 
					    original_handler = WmfImagePlugin._handler
 | 
				
			||||||
    WmfImagePlugin.register_handler(handler)
 | 
					    WmfImagePlugin.register_handler(handler)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    im = hopper()
 | 
					    im = hopper()
 | 
				
			||||||
| 
						 | 
					@ -43,7 +44,7 @@ def test_register_handler(tmp_path):
 | 
				
			||||||
    assert handler.methodCalled
 | 
					    assert handler.methodCalled
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    # Restore the state before this test
 | 
					    # Restore the state before this test
 | 
				
			||||||
    WmfImagePlugin.register_handler(None)
 | 
					    WmfImagePlugin.register_handler(original_handler)
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					
 | 
				
			||||||
def test_load_dpi_rounding():
 | 
					def test_load_dpi_rounding():
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in New Issue
	
	Block a user