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
|
# usage:
# tox --> default, runs pytest
# tox -e fmt --> format the code and README
# tox -e lint --> check code formatting and lint the code
[tox]
envlist = py3
isolated_build = True
[testenv]
deps =
pytest
pytest-codeblocks >= 0.12.1
pytest-cov
# pytest-randomly
extras = all
commands =
pytest {posargs} --codeblocks
[testenv:fmt]
skip_install = True
commands =
isort .
black .
blacken-docs README.md
deps =
black
isort
blacken-docs
[testenv:lint]
skip_install = True
commands =
isort --check .
black --check .
flake8 .
deps =
black
flake8
isort
|