Skip to content

Commit b3117ce

Browse files
committed
pytest integration finished + moved tests/ to top dir
1 parent 492b6f4 commit b3117ce

25 files changed

Lines changed: 403 additions & 2391 deletions

pytesting/pytest.ini

Lines changed: 0 additions & 2 deletions
This file was deleted.
File renamed without changes.
Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,9 @@ def pytest_terminal_summary(terminalreporter, exitstatus):
176176
for item in items:
177177
descr = item.description()
178178
if descr is None:
179-
descr = item.name
179+
try:
180+
descr = item.name
181+
except Exception as e:
182+
descr = repr(e)
180183
terminalreporter.write_line(" * <{0}>".format(descr) , Purple=True, bold=True)
181184
terminalreporter.write_line("")
File renamed without changes.

tests/pytest.ini

Whitespace-only changes.
Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
from conftest import generate_pop_and_exit_fixtures, pop_proc_32, pop_proc_64
1212
from pfwtest import *
1313

14-
# pytestmark = pytest.mark.usefixtures('check_for_gc_garbage', "check_for_handle_leak")
15-
1614
proc32_debug = generate_pop_and_exit_fixtures([pop_proc_32], ids=["proc32dbg"], dwCreationFlags=gdef.DEBUG_PROCESS)
1715
proc64_debug = generate_pop_and_exit_fixtures([pop_proc_64], ids=["proc64dbg"], dwCreationFlags=gdef.DEBUG_PROCESS)
1816

@@ -43,7 +41,6 @@ def get_debug_process_ndll(proc):
4341
ntdll_addr = proc.query_memory(proc_pc).AllocationBase
4442
return windows.pe_parse.GetPEFile(ntdll_addr, target=proc)
4543

46-
# @check_for_handle_leak
4744
def test_simple_standard_breakpoint(proc32_64_debug):
4845
"""Check that a standard Breakpoint method `trigger` is called with the correct informations"""
4946
class TSTBP(windows.debug.Breakpoint):
@@ -58,7 +55,6 @@ def trigger(self, dbg, exc):
5855
d.add_bp(TSTBP(LdrLoadDll))
5956
d.loop()
6057

61-
# @check_for_handle_leak
6258
def test_simple_hwx_breakpoint(proc32_64_debug):
6359
"""Test that simple HXBP are trigger"""
6460

@@ -106,8 +102,7 @@ def trigger(self, dbg, exc):
106102
# Used to verif we actually called the Breakpoints
107103
assert TSTBP.COUNTER == 4
108104

109-
# @check_for_gc_garbage
110-
# @check_for_handle_leak
105+
111106
def test_four_hwx_breakpoint_fail(proc32_64_debug):
112107
"""Check that setting 4HXBP in the same thread fails"""
113108
# print("test_four_hwx_breakpoint_fail {0}".format(proc32_64_debug))
@@ -167,8 +162,7 @@ def trigger(self, dbg, exc):
167162
# Used to verif we actually called the Breakpoints
168163
assert TSTBP.COUNTER == 2
169164

170-
# @check_for_handle_leak
171-
# @check_for_gc_garbage
165+
172166
@pytest.mark.parametrize("bptype", [windows.debug.Breakpoint, windows.debug.HXBreakpoint])
173167
def test_simple_breakpoint_name_addr(proc32_64_debug, bptype):
174168
"""Check breakpoint address resolution for format dll!api"""

0 commit comments

Comments
 (0)