mirror of
https://github.com/hakril/PythonForWindows
synced 2026-06-08 14:31:45 +00:00
improve conftest
This commit is contained in:
+1
-3
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user