run test on PMA 01-01.exe_

This commit is contained in:
Aayush Goel
2023-05-16 12:23:00 +05:30
parent 61554dbaf0
commit e428b74657

View File

@@ -14,6 +14,7 @@ import capa.main
logger = logging.getLogger(__file__)
# We need to skip the binja test if we cannot import binaryninja, e.g., in GitHub CI.
binja_present: bool = False
try:
@@ -51,4 +52,6 @@ def test_binja_feature_counts(sample, scope, feature, expected):
@pytest.mark.skipif(binja_present is False, reason="Skip binja tests if the binaryninja Python API is not installed")
def test_standalone_binja_backend():
assert capa.main.main(["path/to/file", "-b", capa.main.BACKEND_BINJA]) == 0
CD = os.path.dirname(__file__)
test_path = os.path.join(CD, "..", "tests", "data", "Practical Malware Analysis Lab 01-01.exe_")
assert capa.main.main([test_path, "-b", capa.main.BACKEND_BINJA]) == 0