File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -56,7 +56,9 @@ def is_sdk_dbghelp_available():
5656 syswow = ntpath .join (sysroot , "SysWoW64" )
5757
5858 # If it's in System32/SysWoW64, it's the system version, not SDK
59- if pathname .lower ().startswith (system .lower ()) or pathname .lower ().startswith (syswow .lower ()):
59+ if pathname .lower ().startswith (system .lower ()) or pathname .lower ().startswith (
60+ syswow .lower ()
61+ ):
6062 return False
6163
6264 return True
@@ -85,7 +87,7 @@ def test_db_load():
8587
8688@pytest .mark .skipif (
8789 not is_sdk_dbghelp_available (),
88- reason = "Microsoft SDK (Debugging Tools for Windows) is not installed. Only system dbghelp.dll is available."
90+ reason = "Microsoft SDK (Debugging Tools for Windows) is not installed. Only system dbghelp.dll is available." ,
8991)
9092def test_windbg_version ():
9193 from winappdbg import win32
Original file line number Diff line number Diff line change 66
77import sys
88import pytest
9+ import importlib .util
910
1011
1112def is_miasm_available ():
1213 """Check if Miasm is available for import."""
13- try :
14- import miasm .analysis .binary
15- import miasm .analysis .machine
16- import miasm .core .locationdb
17- return True
18- except ImportError :
19- return False
14+ required_modules = [
15+ "miasm.analysis.binary" ,
16+ "miasm.analysis.machine" ,
17+ "miasm.core.locationdb" ,
18+ ]
19+ return all (
20+ importlib .util .find_spec (module ) is not None for module in required_modules
21+ )
2022
2123
2224@pytest .mark .skipif (
2325 not is_miasm_available (),
24- reason = "Miasm is not installed. Install from: https://github.com/cea-sec/miasm"
26+ reason = "Miasm is not installed. Install from: https://github.com/cea-sec/miasm" ,
2527)
2628def test_miasm_engine_integration ():
2729 """Test that MiasmEngine integrates properly with WinAppDbg"""
You can’t perform that action at this time.
0 commit comments