diff options
Diffstat (limited to 'tox.ini')
-rw-r--r-- | tox.ini | 43 |
1 files changed, 21 insertions, 22 deletions
@@ -7,59 +7,58 @@ per-file-ignores = [tox] envlist = python,pylint,pylint-tests,flake8,mypy,black +# This can be removed in tox 4 as it will be the default: isolated_build = true [testenv] -deps = - pytest - lxml: lxml -extras = testing +deps = poetry +skip_install = true passenv = TERM +commands_pre = + poetry install -v --with testing commands = pytest {posargs} [testenv:pylint] -deps = pylint -usedevelop = true +commands_pre = + poetry install -v --with linters commands = pylint --rcfile=pylint.toml fietsboek [testenv:pylint-tests] -deps = pylint -usedevelop = true allowlist_externals = bash +commands_pre = + poetry install -v --with linters,testing commands = bash -c "pylint --rcfile=pylint.tests.toml tests/**/*.py" [testenv:flake8] -deps = flake8 -usedevelop = true +# This is a bit of a hack since flake8 specifies Python 3.8 as minimum required +# version, while fietsboek only specifices 3.7. Thus, we manually install +# flake8 via pip and bypass poetry's locking- +commands_pre = + poetry install -v + pip install flake8 commands = flake8 fietsboek [testenv:sphinx] -deps = sphinx -usedevelop = true allowlist_externals = make changedir={toxinidir}{/}doc +commands_pre = + poetry install -v --with docs commands = make html [testenv:mypy] -deps = - mypy - types-Markdown - types-bleach - types-babel - types-redis - types-requests -usedevelop = true +commands_pre = + poetry install --with types commands = mypy fietsboek [testenv:black] deps = black -usedevelop = true +commands_pre = commands = - black --check fietsboek + black --diff --check fietsboek |