forked from ethereum/py-evm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
119 lines (103 loc) · 5.18 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
[tox]
envlist=
py{35,36}-{core,database,transactions,vm,native-blockchain}
py{36}-{benchmark,p2p,trinity,lightchain_integration}
py{36}-rpc-blockchain
py{36}-rpc-state-{frontier,homestead,eip150,eip158,byzantium,quadratic}
py{35,36}-native-state-{frontier,homestead,eip150,eip158,byzantium,constantinople,metropolis}
py37-{core,trinity,trinity-integration}
py{35,36}-lint
py36-docs
[flake8]
max-line-length= 100
exclude=
ignore=
[testenv]
usedevelop=True
passenv =
PYTEST_ADDOPTS
TRAVIS_EVENT_TYPE
commands=
core: pytest {posargs:tests/core/}
trinity: pytest {posargs:tests/trinity/core/}
p2p: pytest {posargs:tests/p2p}
database: pytest {posargs:tests/database}
rpc-blockchain: pytest {posargs:tests/trinity/json-fixtures-over-rpc/test_rpc_fixtures.py -k 'not GeneralStateTests'}
rpc-state-frontier: pytest {posargs:tests/trinity/json-fixtures-over-rpc/test_rpc_fixtures.py -k 'GeneralStateTests and not stQuadraticComplexityTest and Frontier'}
rpc-state-homestead: pytest {posargs:tests/trinity/json-fixtures-over-rpc/test_rpc_fixtures.py -k 'GeneralStateTests and not stQuadraticComplexityTest and Homestead'}
rpc-state-eip150: pytest {posargs:tests/trinity/json-fixtures-over-rpc/test_rpc_fixtures.py -k 'GeneralStateTests and not stQuadraticComplexityTest and EIP150'}
rpc-state-eip158: pytest {posargs:tests/trinity/json-fixtures-over-rpc/test_rpc_fixtures.py -k 'GeneralStateTests and not stQuadraticComplexityTest and EIP158'}
# The following test seems to consume a lot of memory. Restricting to 3 processes reduces crashes
rpc-state-byzantium: pytest -n3 {posargs:tests/trinity/json-fixtures-over-rpc/test_rpc_fixtures.py -k 'GeneralStateTests and not stQuadraticComplexityTest and Byzantium'}
rpc-state-quadratic: pytest {posargs:tests/trinity/json-fixtures-over-rpc/test_rpc_fixtures.py -k 'GeneralStateTests and stQuadraticComplexityTest'}
transactions: pytest {posargs:tests/json-fixtures/test_transactions.py}
vm: pytest {posargs:tests/json-fixtures/test_virtual_machine.py}
native-blockchain: pytest {posargs:tests/json-fixtures/test_blockchain.py}
native-state-frontier: pytest {posargs:tests/json-fixtures/test_state.py -k Frontier}
native-state-homestead: pytest {posargs:tests/json-fixtures/test_state.py -k Homestead}
native-state-eip150: pytest {posargs:tests/json-fixtures/test_state.py -k EIP150}
native-state-eip158: pytest {posargs:tests/json-fixtures/test_state.py -k EIP158}
native-state-byzantium: pytest {posargs:tests/json-fixtures/test_state.py -k Byzantium}
native-state-constantinople: pytest {posargs:tests/json-fixtures/test_state.py -k Constantinople}
native-state-metropolis: pytest {posargs:tests/json-fixtures/test_state.py -k Metropolis}
lightchain_integration: pytest --integration {posargs:tests/trinity/integration/test_lightchain_integration.py}
deps = .[p2p,trinity,eth-extra,test]
basepython =
py35: python3.5
py36: python3.6
py37: python3.7
[testenv:py36-docs]
whitelist_externals=
make
deps = .[p2p, trinity, doc]
passenv =
PYTEST_ADDOPTS
TRAVIS_EVENT_TYPE
commands=
make validate-docs
[common-trinity-integration]
deps = .[p2p,trinity,eth-extra,test]
passenv =
PYTEST_ADDOPTS
TRAVIS_EVENT_TYPE
commands=
# We don't want to run these tests concurrently to avoid running into errors
# due to multiple Trinity instances competing for the same ports
pytest -n 1 {posargs:tests/trinity/integration/ -k 'not lightchain_integration'}
[testenv:py36-trinity-integration]
deps = {[common-trinity-integration]deps}
passenv = {[common-trinity-integration]passenv}
commands = {[common-trinity-integration]commands}
[testenv:py37-trinity-integration]
deps = {[common-trinity-integration]deps}
passenv = {[common-trinity-integration]passenv}
commands = {[common-trinity-integration]commands}
[testenv:py36-benchmark]
deps = .[p2p,trinity,eth-extra,benchmark]
commands=
benchmark: {toxinidir}/scripts/benchmark/run.py
[common-lint]
deps = .[lint]
setenv=MYPYPATH={toxinidir}:{toxinidir}/stubs
commands=
flake8 {toxinidir}/eth
[testenv:py35-lint]
deps = {[common-lint]deps}
setenv = {[common-lint]setenv}
commands=
{[common-lint]commands}
flake8 {toxinidir}/tests --exclude="trinity,p2p"
# TODO: Drop --ignore-missing-imports once we have type annotations for eth_utils, coincurve and cytoolz
mypy --follow-imports=silent --ignore-missing-imports --no-strict-optional --check-untyped-defs --disallow-incomplete-defs -p eth
[testenv:py36-lint]
deps = {[common-lint]deps}
setenv = {[common-lint]setenv}
commands=
{[common-lint]commands}
flake8 {toxinidir}/tests
flake8 {toxinidir}/p2p
flake8 {toxinidir}/trinity
flake8 {toxinidir}/scripts
# TODO: Drop --ignore-missing-imports once we have type annotations for eth_utils, coincurve and cytoolz
mypy --follow-imports=silent --ignore-missing-imports --no-strict-optional --check-untyped-defs --disallow-incomplete-defs --disallow-untyped-defs --disallow-any-generics scripts/benchmark
mypy --follow-imports=silent --ignore-missing-imports --no-strict-optional --check-untyped-defs --disallow-incomplete-defs --disallow-untyped-defs --disallow-any-generics -p p2p -p trinity