From c7b4712a40fee54b92cde27749b38a896cc58eef Mon Sep 17 00:00:00 2001 From: Nikhil Parasaram Date: Wed, 11 Mar 2020 01:06:27 +0000 Subject: [PATCH] Fix tests --- tests/graph_test.py | 2 ++ tests/laser/evm_testsuite/evm_test.py | 3 ++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/tests/graph_test.py b/tests/graph_test.py index ac33cabd..f097cfbf 100644 --- a/tests/graph_test.py +++ b/tests/graph_test.py @@ -13,6 +13,7 @@ def test_generate_graph(): continue contract = EVMContract(input_file.read_text()) disassembler = MythrilDisassembler() + disassembler.contracts.append(contract) analyzer = MythrilAnalyzer( disassembler=disassembler, @@ -20,6 +21,7 @@ def test_generate_graph(): execution_timeout=5, max_depth=30, address=(util.get_indexed_address(0)), + solver_timeout=10000 ) analyzer.graph_html(transaction_count=1) diff --git a/tests/laser/evm_testsuite/evm_test.py b/tests/laser/evm_testsuite/evm_test.py index 54c0bd5e..c12ddd68 100644 --- a/tests/laser/evm_testsuite/evm_test.py +++ b/tests/laser/evm_testsuite/evm_test.py @@ -1,6 +1,7 @@ from mythril.laser.ethereum.svm import LaserEVM from mythril.laser.ethereum.state.account import Account from mythril.laser.ethereum.state.world_state import WorldState +from mythril.laser.ethereum.time_handler import time_handler from mythril.laser.ethereum.keccak_function_manager import keccak_function_manager from mythril.disassembler.disassembly import Disassembly from mythril.laser.ethereum.transaction.concolic import execute_message_call @@ -130,9 +131,9 @@ def test_vmtest( world_state.put_account(account) account.set_balance(int(details["balance"], 16)) + time_handler.start_execution(10000) laser_evm = LaserEVM() laser_evm.open_states = [world_state] - # Act laser_evm.time = datetime.now()