Add analysis tests

pull/906/head
Nikhil Parasaram 6 years ago
parent d91ae2bc69
commit cb9baaead7
  1. 13
      tests/mythril/analyzer_test.py
  2. 4
      tests/mythril/mythril_disassembler_test.py

@ -1,3 +1,16 @@
import pytest
from pathlib import Path
from mythril.mythril import *
fire_lasers_execute = []
def fire_lasers_test():
disassembler = MythrilDisassembler(eth=None)
disassembler.load_from_solidity(
Path(__file__).parent.parent / "testdata/input_contracts/origin.sol"
)
analyzer = MythrilAnalyzer(disassembler)
issues = analyzer.fire_lasers(strategy="dfs").sorted_issues()
assert len(issues) == 1
assert issues["swc-id"] == "111"

@ -67,3 +67,7 @@ def test_get_data_from_storage_extra_params(params):
disassembler.get_state_variable_from_storage(
"0x76799f77587738bfeef09452df215b63d2cfb08a", params
)
def test_solc_install():
MythrilDisassembler(eth=None, solc_version="0.4.19")

Loading…
Cancel
Save