diff --git a/tests/mythril/analyzer_test.py b/tests/mythril/analyzer_test.py deleted file mode 100644 index 2f903a7c..00000000 --- a/tests/mythril/analyzer_test.py +++ /dev/null @@ -1,16 +0,0 @@ -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" diff --git a/tests/mythril/mythril_analyzer_test.py b/tests/mythril/mythril_analyzer_test.py new file mode 100644 index 00000000..730c3046 --- /dev/null +++ b/tests/mythril/mythril_analyzer_test.py @@ -0,0 +1,24 @@ +import pytest +from pathlib import Path +from mythril.mythril import * + + +def test_fire_lasers(): + disassembler = MythrilDisassembler(eth=None) + print(str((Path(__file__).parent.parent / "testdata/input_contracts/origin.sol"))) + print(Path(__file__)) + disassembler.load_from_solidity( + [ + str( + ( + Path(__file__).parent.parent / "testdata/input_contracts/origin.sol" + ).absolute() + ) + ] + ) + analyzer = MythrilAnalyzer(disassembler) + issues = analyzer.fire_lasers( + strategy="dfs", max_depth=30, transaction_count=2, create_timeout=10, modules=[] + ).sorted_issues() + assert len(issues) == 1 + assert issues[0]["swc-id"] == "111"