mirror of
https://github.com/mandiant/capa.git
synced 2026-04-28 11:53:20 -07:00
fix: freeze/__init__.py: NO_ADDRESS < NO_ADDRESS returns True
Closes #3025
This commit is contained in:
committed by
Willi Ballenthin
parent
c7d3de8bf8
commit
f17629a4eb
@@ -36,6 +36,8 @@
|
||||
|
||||
- fix: base_extractor.py: __metaclass__ is Python 2 syntax, ignored in Py3 @williballenthin #3024
|
||||
|
||||
- fix: freeze/__init__.py: NO_ADDRESS < NO_ADDRESS returns True @williballenthin #3025
|
||||
|
||||
### capa Explorer Web
|
||||
|
||||
### capa Explorer IDA Pro plugin
|
||||
|
||||
@@ -173,7 +173,7 @@ class Address(HashableModel):
|
||||
return self.type < other.type
|
||||
|
||||
if self.type is AddressType.NO_ADDRESS:
|
||||
return True
|
||||
return False
|
||||
|
||||
else:
|
||||
assert self.type == other.type
|
||||
|
||||
@@ -165,6 +165,11 @@ def test_serialize_features():
|
||||
roundtrip_feature(capa.features.insn.Property("System.IO.FileInfo::Length"))
|
||||
|
||||
|
||||
def test_no_address_lt_irreflexivity():
|
||||
no_addr = capa.features.freeze.Address.from_capa(capa.features.address.NO_ADDRESS)
|
||||
assert not (no_addr < no_addr)
|
||||
|
||||
|
||||
def test_freeze_sample(tmpdir, z9324d_extractor):
|
||||
# tmpdir fixture handles cleanup
|
||||
o = tmpdir.mkdir("capa").join("test.frz").strpath
|
||||
|
||||
Reference in New Issue
Block a user