tox: add black (via pre-commit) to tests (#51394)
This commit is contained in:
parent
820fe90fe6
commit
4e1862d3df
|
@ -0,0 +1,8 @@
|
|||
# See https://pre-commit.com for more information
|
||||
# See https://pre-commit.com/hooks.html for more hooks
|
||||
repos:
|
||||
- repo: https://github.com/psf/black
|
||||
rev: 20.8b1
|
||||
hooks:
|
||||
- id: black
|
||||
args: ['--target-version', 'py37', '--skip-string-normalization', '--line-length', '110']
|
4
tox.ini
4
tox.ini
|
@ -1,6 +1,6 @@
|
|||
[tox]
|
||||
toxworkdir = {env:TMPDIR:/tmp}/tox-{env:USER}/docbow/{env:BRANCH_NAME:}
|
||||
envlist = py3-{django111,django22}-{pw,pfwb}-coverage,py3-{django111,django22}-mellon-coverage,py3-django11120, py3-{django111,django22}-pfwbmellon-coverage
|
||||
envlist = py3-{django111,django22}-{pw,pfwb}-coverage,py3-{django111,django22}-mellon-coverage,py3-django11120, py3-{django111,django22}-pfwbmellon-coverage, black
|
||||
|
||||
[testenv]
|
||||
usedevelop = True
|
||||
|
@ -23,6 +23,7 @@ deps =
|
|||
mellon: django-mellon
|
||||
pfwbmellon: django-mellon
|
||||
py3: beautifulsoup4
|
||||
pre-commit
|
||||
setenv =
|
||||
SECRET_KEY=changeme
|
||||
pw: PARLEMENT=pw
|
||||
|
@ -41,3 +42,4 @@ commands =
|
|||
mellon: py.test {posargs: {env:COVERAGE:} --junitxml=junit-{envname}.xml tests/sso/}
|
||||
django11120: py.test {posargs: --junitxml=junit-{envname}.xml tests/main/test_main.py}
|
||||
pfwbmellon: py.test {posargs: {env:COVERAGE:} --junitxml=junit-{envname}.xml tests/pfwbmellon/}
|
||||
black: pre-commit run black --all-files --show-diff-on-failure
|
||||
|
|
Loading…
Reference in New Issue