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

Commit 38f6456

Browse files
committed
test_vm default is notrace, option is --trace
1 parent 6602394 commit 38f6456

File tree

2 files changed

+10
-5
lines changed

2 files changed

+10
-5
lines changed

ethereum/tests/test_vm.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,9 @@
66
logger = get_logger()
77
# customize VM log output to your needs
88
# hint: use 'py.test' with the '-s' option to dump logs to the console
9-
if '--notrace' not in sys.argv:
9+
if '--trace' in sys.argv: # not default
1010
configure_logging(':trace')
11-
else:
12-
sys.argv.remove('--notrace')
11+
sys.argv.remove('trace')
1312

1413

1514
def do_test_vm(filename, testname=None, testdata=None, limit=99999999):

setup.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,14 @@
1+
import sys
12
from setuptools import setup, find_packages
2-
33
from setuptools.command.test import test as TestCommand
44

55

66
class PyTest(TestCommand):
7+
user_options = [('pytest-args=', 'a', "Arguments to pass to py.test")]
8+
9+
def initialize_options(self):
10+
TestCommand.initialize_options(self)
11+
self.pytest_args = []
712

813
def finalize_options(self):
914
TestCommand.finalize_options(self)
@@ -13,7 +18,8 @@ def finalize_options(self):
1318
def run_tests(self):
1419
# import here, cause outside the eggs aren't loaded
1520
import pytest
16-
pytest.main(self.test_args)
21+
errno = pytest.main(self.pytest_args)
22+
sys.exit(errno)
1723

1824

1925
console_scripts = []

0 commit comments

Comments
 (0)