Skip to content

Commit 779d35a

Browse files
committed
improve conftest
1 parent ac89a6f commit 779d35a

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

tests/conftest.py

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,16 +103,14 @@ def print_new_handle_type(self):
103103
print(self.handles_types(self.get_new_handle()))
104104

105105

106-
current_process_hdebugger = HandleDebugger(windows.current_process.pid)
107-
current_process_hdebugger.refresh_handles()
108106

109107
class NoLeakAssert(AssertionError):
110108
pass
111109

112110

113-
114111
@pytest.fixture()
115112
def check_for_handle_leak(request):
113+
current_process_hdebugger = HandleDebugger(windows.current_process.pid)
116114
x = current_process_hdebugger.refresh_handles()
117115
yield None
118116
leaked_handles = current_process_hdebugger.get_new_handle(x)

0 commit comments

Comments
 (0)