This commit is contained in:
Willi Ballenthin
2025-10-29 20:29:08 +01:00
parent f252b6bbd0
commit b5e5840a63
3 changed files with 5 additions and 4 deletions

View File

@@ -138,6 +138,7 @@ repos:
- "--ignore=tests/test_ghidra_features.py"
- "--ignore=tests/test_ida_features.py"
- "--ignore=tests/test_viv_features.py"
- "--ignore=tests/test_idalib_features.py"
- "--ignore=tests/test_main.py"
- "--ignore=tests/test_scripts.py"
always_run: true

View File

@@ -12,7 +12,6 @@
# See the License for the specific language governing permissions and
# limitations under the License.
import io
import logging
import contextlib
import collections
@@ -202,6 +201,7 @@ def get_binja_extractor(path: Path):
return extractor
# we can't easily cache this because the extractor relies on global state (the opened database)
# which also has to be closed elsewhere. so, the idalib tests will just take a little bit to run.
def get_idalib_extractor(path: Path):

View File

@@ -1,4 +1,3 @@
# Copyright 2020 Google LLC
#
# Licensed under the Apache License, Version 2.0 (the "License");
@@ -16,11 +15,10 @@
import logging
import pytest
import fixtures
import capa.features.extractors.ida.idalib
import fixtures
logger = logging.getLogger(__name__)
idalib_present = capa.features.extractors.ida.idalib.has_idalib()
@@ -38,6 +36,7 @@ def test_idalib_features(sample, scope, feature, expected):
finally:
logger.debug("closing database...")
import idapro
idapro.close_database(save=False)
logger.debug("opened database.")
@@ -54,5 +53,6 @@ def test_idalib_feature_counts(sample, scope, feature, expected):
finally:
logger.debug("closing database...")
import idapro
idapro.close_database(save=False)
logger.debug("closed database.")