Skip to content
This repository has been archived by the owner on May 23, 2023. It is now read-only.

added a command line option to print vm trace #775

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
10 changes: 10 additions & 0 deletions ethereum/tests/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,13 @@ def pytest_runtest_call(item):

if catchlog_handler and catchlog_handler in slogging.rootLogger.handlers:
slogging.rootLogger.removeHandler(catchlog_handler)


# Configuration file for adding commandline arguements in pytest
def pytest_addoption(parser):
parser.addoption("--tracevm", action="store_true",
help="print vm trace")

@pytest.fixture
def tracevm(request):
return request.config.getoption("--tracevm")
4 changes: 2 additions & 2 deletions ethereum/tests/test_state.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@
logger = get_logger()
# customize VM log output to your needs
# hint: use 'py.test' with the '-s' option to dump logs to the console
if '--trace' in sys.argv: # not default
if '--tracevm' in sys.argv: # not default
configure_logging(':trace')
sys.argv.remove('--trace')
sys.argv.remove('--tracevm')


def test_state(filename, testname, testdata):
Expand Down