tox: add black (via pre-commit) to tests (#50927)

This commit is contained in:
Frédéric Péters 2021-02-05 15:48:46 +01:00
parent 2f012a4ae7
commit f94c4647b5
1 changed files with 3 additions and 1 deletions

View File

@ -1,6 +1,6 @@
[tox] [tox]
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/wcs/{env:BRANCH_NAME:main}/{env:EXECUTOR_NUMBER:} toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/wcs/{env:BRANCH_NAME:main}/{env:EXECUTOR_NUMBER:}
envlist = py3-django111-pylint-coverage, py3-django22 envlist = py3-django111-black-pylint-coverage, py3-django22
[testenv] [testenv]
sitepackages = true sitepackages = true
@ -42,6 +42,8 @@ deps =
pyproj pyproj
pylint pylint
Quixote>=3.0,<3.2 Quixote>=3.0,<3.2
pre-commit
commands = commands =
py.test -v {env:COVERAGE:} --junitxml=junit-{envname}.xml {posargs:tests/} py.test -v {env:COVERAGE:} --junitxml=junit-{envname}.xml {posargs:tests/}
pylint: ./pylint.sh wcs/ pylint: ./pylint.sh wcs/
black: pre-commit run black --all-files --show-diff-on-failure