1
0
mirror of https://github.com/RIOT-OS/RIOT.git synced 2024-12-29 04:50:03 +01:00
RIOT/dist/tools/backport_pr/tox.ini
Alexandre Abadie 43a7c8c8f2
tools/backport_pr: add black testenv in tox
Add Flake8 and Pylint configuration compatible with black
2021-10-22 10:20:52 +02:00

41 lines
836 B
INI

[tox]
envlist = test,lint,flake8,black
skipsdist = True
[testenv]
basepython = python3
deps = -r {toxinidir}/requirements.txt
setenv =
script = backport_pr.py
commands =
test: {[testenv:test]commands}
lint: {[testenv:lint]commands}
flake8: {[testenv:flake8]commands}
black: {[testenv:black]commands}
[testenv:test]
deps =
pytest
{[testenv]deps}
commands =
pytest -v --doctest-modules {env:script}
[testenv:lint]
deps =
pylint
{[testenv]deps}
commands =
# Suppress warning about TODO in code
pylint --rcfile=setup.cfg --disable=fixme {env:script}
[testenv:flake8]
deps = flake8
commands =
# main() is quite complex, provide enough margin
flake8 --max-complexity=25 {env:script}
[testenv:black]
deps = black
commands =
black --check --diff {env:script}