mirror of
https://github.com/mandiant/capa.git
synced 2026-02-04 11:07:53 -08:00
pep8
This commit is contained in:
@@ -123,8 +123,14 @@ def test_addr_to_pb2():
|
||||
def test_scope_to_pb2():
|
||||
assert capa.render.proto.proto.scope_to_pb2(capa.rules.Scope(capa.rules.FILE_SCOPE)) == capa_pb2.SCOPE_FILE
|
||||
assert capa.render.proto.proto.scope_to_pb2(capa.rules.Scope(capa.rules.FUNCTION_SCOPE)) == capa_pb2.SCOPE_FUNCTION
|
||||
assert capa.render.proto.proto.scope_to_pb2(capa.rules.Scope(capa.rules.BASIC_BLOCK_SCOPE)) == capa_pb2.SCOPE_BASIC_BLOCK
|
||||
assert capa.render.proto.proto.scope_to_pb2(capa.rules.Scope(capa.rules.INSTRUCTION_SCOPE)) == capa_pb2.SCOPE_INSTRUCTION
|
||||
assert (
|
||||
capa.render.proto.proto.scope_to_pb2(capa.rules.Scope(capa.rules.BASIC_BLOCK_SCOPE))
|
||||
== capa_pb2.SCOPE_BASIC_BLOCK
|
||||
)
|
||||
assert (
|
||||
capa.render.proto.proto.scope_to_pb2(capa.rules.Scope(capa.rules.INSTRUCTION_SCOPE))
|
||||
== capa_pb2.SCOPE_INSTRUCTION
|
||||
)
|
||||
|
||||
|
||||
def cmp_optional(a: Any, b: Any) -> bool:
|
||||
|
||||
@@ -6,15 +6,15 @@
|
||||
# is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and limitations under the License.
|
||||
import copy
|
||||
|
||||
import pytest
|
||||
from fixtures import *
|
||||
|
||||
import capa
|
||||
import capa.engine as ceng
|
||||
import capa.render.result_document as rdoc
|
||||
import capa.features.freeze.features as frzf
|
||||
|
||||
from fixtures import *
|
||||
|
||||
|
||||
def test_optional_node_from_capa():
|
||||
node = rdoc.node_from_capa(
|
||||
@@ -267,4 +267,4 @@ def assert_round_trip(rd: rdoc.ResultDocument):
|
||||
)
|
||||
def test_round_trip(request, rd_file):
|
||||
rd: rdoc.ResultDocument = request.getfixturevalue(rd_file)
|
||||
assert_round_trip(rd)
|
||||
assert_round_trip(rd)
|
||||
|
||||
Reference in New Issue
Block a user