mirror of
https://github.com/mandiant/capa.git
synced 2025-12-21 23:00:29 -08:00
introduce flake8-comprehensions
This commit is contained in:
@@ -359,7 +359,7 @@ def test_instruction_scope(z9324d_extractor):
|
||||
)
|
||||
capabilities, meta = capa.main.find_capabilities(rules, z9324d_extractor)
|
||||
assert "push 1000" in capabilities
|
||||
assert 0x4071A4 in set(map(lambda result: result[0], capabilities["push 1000"]))
|
||||
assert 0x4071A4 in {result[0] for result in capabilities["push 1000"]}
|
||||
|
||||
|
||||
def test_instruction_subscope(z9324d_extractor):
|
||||
@@ -389,7 +389,7 @@ def test_instruction_subscope(z9324d_extractor):
|
||||
)
|
||||
capabilities, meta = capa.main.find_capabilities(rules, z9324d_extractor)
|
||||
assert "push 1000 on i386" in capabilities
|
||||
assert 0x406F60 in set(map(lambda result: result[0], capabilities["push 1000 on i386"]))
|
||||
assert 0x406F60 in {result[0] for result in capabilities["push 1000 on i386"]}
|
||||
|
||||
|
||||
def test_fix262(pma16_01_extractor, capsys):
|
||||
@@ -433,9 +433,9 @@ def test_json_meta(capsys):
|
||||
std = capsys.readouterr()
|
||||
std_json = json.loads(std.out)
|
||||
|
||||
assert {"type": "absolute", "value": 0x10001010} in list(
|
||||
map(lambda f: f["address"], std_json["meta"]["analysis"]["layout"]["functions"])
|
||||
)
|
||||
assert {"type": "absolute", "value": 0x10001010} in [
|
||||
f["address"] for f in std_json["meta"]["analysis"]["layout"]["functions"]
|
||||
]
|
||||
|
||||
for addr, info in std_json["meta"]["analysis"]["layout"]["functions"]:
|
||||
if addr == ["absolute", 0x10001010]:
|
||||
|
||||
Reference in New Issue
Block a user