forked from ethereum/py-evm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
84 lines (78 loc) · 3.51 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
[tox]
envlist=
py{37,38,39,310,311}-{core,database,difficulty,transactions,vm}
py311-native-blockchain-{ \
metropolis, transition, frontier, homestead, tangerine_whistle, \
spurious_dragon, byzantium, constantinople, petersburg, istanbul, \
berlin, london, merge, shanghai \
}
py{38,39,310,311}-lint
docs
[isort]
combine_as_imports=True
extra_standard_library=pytest
force_grid_wrap=1
force_sort_within_sections=True
known_first_party=eth
multi_line_output=3
profile=black
# skip `__init__.py` files because sometimes order of initialization is important
skip=__init__.py
[flake8]
max-line-length= 88
exclude=venv*,.tox,docs,build
extend-ignore= E203,W503
[testenv]
usedevelop=True
passenv =
PYTEST_ADDOPTS
TRAVIS_EVENT_TYPE
commands=
core: pytest {posargs:tests/core/}
docs: make validate-docs
database: pytest {posargs:tests/database}
difficulty: pytest {posargs:tests/json-fixtures/test_difficulty.py}
transactions: pytest {posargs:tests/json-fixtures/test_transactions.py}
vm: pytest {posargs:tests/json-fixtures/test_virtual_machine.py}
native-blockchain-metropolis: pytest {posargs:tests/json-fixtures/blockchain/test_blockchain.py --fork Metropolis}
native-blockchain-transition: pytest {posargs:tests/json-fixtures/blockchain/test_blockchain.py -k TransitionTests --tx '2*popen//execmodel=eventlet'}
native-blockchain-frontier: pytest {posargs:tests/json-fixtures/blockchain/test_blockchain.py --fork Frontier}
native-blockchain-homestead: pytest {posargs:tests/json-fixtures/blockchain/test_blockchain.py --fork Homestead}
native-blockchain-tangerine_whistle: pytest {posargs:tests/json-fixtures/blockchain/test_blockchain.py --fork EIP150}
native-blockchain-spurious_dragon: pytest {posargs:tests/json-fixtures/blockchain/test_blockchain.py --fork EIP158}
native-blockchain-byzantium: pytest {posargs:tests/json-fixtures/blockchain/test_blockchain.py --fork Byzantium}
native-blockchain-constantinople: pytest {posargs:tests/json-fixtures/blockchain/test_blockchain.py --fork Constantinople}
native-blockchain-petersburg: pytest {posargs:tests/json-fixtures/blockchain/test_blockchain.py --fork ConstantinopleFix}
native-blockchain-istanbul: pytest {posargs:tests/json-fixtures/blockchain/test_blockchain.py --fork Istanbul}
native-blockchain-berlin: pytest {posargs:tests/json-fixtures/blockchain/test_blockchain.py --fork Berlin}
native-blockchain-london: pytest {posargs:tests/json-fixtures/blockchain/test_blockchain.py --fork London}
native-blockchain-merge: pytest {posargs:tests/json-fixtures/blockchain/test_blockchain.py --fork Merge}
native-blockchain-shanghai: pytest {posargs:tests/json-fixtures/blockchain/test_blockchain.py --fork Shanghai}
basepython =
docs: python
py37: python3.7
py38: python3.8
py39: python3.9
py310: python3.10
py311: python3.11
extras=
docs
eth-extra
test
allowlist_externals=make
[common-lint]
basepython=python
extras=lint
allowlist_externals=black
commands=
flake8 {toxinidir}/eth {toxinidir}/tests {toxinidir}/scripts
mypy -p eth --config-file {toxinidir}/mypy.ini
isort --check-only --diff {toxinidir}/eth/ {toxinidir}/tests/ {toxinidir}/scripts/
black --check {toxinidir}/eth {toxinidir}/docs {toxinidir}/tests {toxinidir}/scripts/ {toxinidir}/setup.py
[testenv:lint]
basepython: python
extras: {[common-lint]extras}
commands: {[common-lint]commands}
[testenv:py{38,39,310,311}-lint]
extras: {[common-lint]extras}
commands: {[common-lint]commands}