Security analysis tool for EVM bytecode. Supports smart contracts built for Ethereum, Hedera, Quorum, Vechain, Roostock, Tron and other EVM-compatible blockchains.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
mythril/tests/integration_tests/coverage_metrics_test.py

20 lines
434 B

import pytest
from utils import output_of
from tests import PROJECT_DIR, TESTDATA
MYTH = str(PROJECT_DIR / "myth")
test_data = [
(open(f"{TESTDATA}/inputs/coverage.sol.o").read(), True),
]
@pytest.mark.parametrize("code, exists", test_data)
def test_basic_coverage(code, exists):
assert (
"instruction_discovery_time"
in output_of(f"{MYTH} a -c 0x{code} --solver-timeout 1000 -o jsonv2")
) == exists