fix ruff F401 pytes issues

This commit is contained in:
Yacine Elhamer
2023-07-11 14:26:59 +01:00
parent 85d4c00096
commit 37c1bf98eb
2 changed files with 8 additions and 7 deletions

1
.github/ruff.toml vendored
View File

@@ -60,3 +60,4 @@ exclude = [
"tests/test_dotnet_features.py" = ["F401", "F811"]
"tests/test_result_document.py" = ["F401", "F811"]
"tests/test_dotnetfile_features.py" = ["F401", "F811"]
"tests/test_static_freeze.py" = ["F401"]

View File

@@ -155,6 +155,13 @@ def test_serialize_features():
roundtrip_feature(capa.features.insn.Property("System.IO.FileInfo::Length"))
def test_freeze_sample(tmpdir, z9324d_extractor):
# tmpdir fixture handles cleanup
o = tmpdir.mkdir("capa").join("test.frz").strpath
path = z9324d_extractor.path
assert capa.features.freeze.main([path, o, "-v"]) == 0
@pytest.mark.parametrize(
"extractor",
[
@@ -173,10 +180,3 @@ def test_freeze_load_sample(tmpdir, request, extractor):
null_extractor = capa.features.freeze.load(f.read())
compare_extractors(extractor, null_extractor)
def test_freeze_sample(tmpdir, z9324d_extractor):
# tmpdir fixture handles cleanup
o = tmpdir.mkdir("capa").join("test.frz").strpath
path = z9324d_extractor.path
assert capa.features.freeze.main([path, o, "-v"]) == 0