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/old_version_test.py

21 lines
516 B

import pytest
import json
import sys
from tests import PROJECT_DIR, TESTDATA
from utils import output_of
MYTH = str(PROJECT_DIR / "myth")
test_data = (
("old_origin.sol", 1),
("old_version.sol", 2),
)
@pytest.mark.parametrize("file_name, issues", test_data)
def test_analysis_old(file_name, issues):
file = str(TESTDATA / "input_contracts" / file_name)
command = f"python3 {MYTH} analyze {file} -o jsonv2"
output = json.loads(output_of(command))
assert len(output[0]["issues"]) >= issues