mirror of
https://github.com/mandiant/capa.git
synced 2026-01-12 13:05:23 -08:00
tests: idalib: better detect missing idapro package
This commit is contained in:
@@ -22,6 +22,11 @@ import capa.features.extractors.ida.idalib
|
||||
logger = logging.getLogger(__name__)
|
||||
|
||||
idalib_present = capa.features.extractors.ida.idalib.has_idalib()
|
||||
if idalib_present:
|
||||
try:
|
||||
import idapro # noqa: F401 [imported but unused]
|
||||
except ImportError:
|
||||
idalib_present = False
|
||||
|
||||
|
||||
@pytest.mark.skipif(idalib_present is False, reason="Skip idalib tests if the idalib Python API is not installed")
|
||||
|
||||
Reference in New Issue
Block a user