Fixed restoring original state

This commit is contained in:
Andrew Murray 2020-03-27 22:15:04 +11:00
parent b602f365ae
commit cbf0bf1010

View File

@ -35,6 +35,7 @@ def test_register_handler(tmp_path):
self.methodCalled = True
handler = TestHandler()
original_handler = WmfImagePlugin._handler
WmfImagePlugin.register_handler(handler)
im = hopper()
@ -43,7 +44,7 @@ def test_register_handler(tmp_path):
assert handler.methodCalled
# Restore the state before this test
WmfImagePlugin.register_handler(None)
WmfImagePlugin.register_handler(original_handler)
def test_load_dpi_rounding():