improve conftest

This commit is contained in:
hakril
2025-01-16 22:31:33 +01:00
parent 234844cf12
commit 3a3e6bc931
+1 -3
View File
@@ -103,16 +103,14 @@ class HandleDebugger(object):
print(self.handles_types(self.get_new_handle()))
current_process_hdebugger = HandleDebugger(windows.current_process.pid)
current_process_hdebugger.refresh_handles()
class NoLeakAssert(AssertionError):
pass
@pytest.fixture()
def check_for_handle_leak(request):
current_process_hdebugger = HandleDebugger(windows.current_process.pid)
x = current_process_hdebugger.refresh_handles()
yield None
leaked_handles = current_process_hdebugger.get_new_handle(x)