2021-07-13 15:45:57 +00:00
|
|
|
[tox]
|
2022-09-16 09:09:49 +00:00
|
|
|
envlist = test
|
2021-07-13 15:45:57 +00:00
|
|
|
skip_missing_interpreters = True
|
|
|
|
|
isolated_build = True
|
2022-05-13 20:36:55 +00:00
|
|
|
setenv =
|
|
|
|
|
PYTHONDONTWRITEBYTECODE=1
|
2021-07-13 15:45:57 +00:00
|
|
|
|
2021-07-23 20:58:24 +00:00
|
|
|
[testenv:isort]
|
2022-05-13 20:36:55 +00:00
|
|
|
commands =
|
|
|
|
|
isort src/djlint
|
|
|
|
|
isort tests
|
2021-09-08 09:52:16 +00:00
|
|
|
skip_install: True
|
2022-09-12 07:58:45 +00:00
|
|
|
allowlist_externals = isort
|
2021-07-23 20:58:24 +00:00
|
|
|
|
|
|
|
|
[testenv:black]
|
2022-05-13 20:36:55 +00:00
|
|
|
commands =
|
|
|
|
|
black src/djlint
|
|
|
|
|
black tests
|
2021-09-08 09:52:16 +00:00
|
|
|
skip_install: True
|
2022-09-12 07:58:45 +00:00
|
|
|
allowlist_externals = black
|
2021-07-23 20:58:24 +00:00
|
|
|
|
|
|
|
|
[testenv:lint]
|
|
|
|
|
deps =
|
2022-08-02 15:13:02 +00:00
|
|
|
; flake8 has a dep conflict
|
2022-09-21 05:35:08 +00:00
|
|
|
; some can be installed manually
|
2022-08-02 15:13:02 +00:00
|
|
|
; here.
|
2021-07-23 20:58:24 +00:00
|
|
|
flake8
|
2022-09-01 20:23:08 +00:00
|
|
|
flake8-print
|
2021-07-23 20:58:24 +00:00
|
|
|
flake8-docstrings
|
|
|
|
|
flake8-builtins
|
|
|
|
|
flake8-comprehensions
|
|
|
|
|
flake8-pytest-style
|
|
|
|
|
flake8-simplify
|
|
|
|
|
flake8-variables-names
|
|
|
|
|
commands =
|
|
|
|
|
flake8 src/djlint
|
|
|
|
|
black --fast --check src/djlint
|
|
|
|
|
pylint src/djlint
|
|
|
|
|
mypy src/djlint
|
2022-05-13 20:36:55 +00:00
|
|
|
flake8 tests
|
|
|
|
|
black --fast --check tests
|
|
|
|
|
pylint tests
|
|
|
|
|
mypy tests
|
2021-07-23 20:58:24 +00:00
|
|
|
skip_install: true
|
2022-09-12 07:58:45 +00:00
|
|
|
allowlist_externals =
|
|
|
|
|
black
|
|
|
|
|
mypy
|
|
|
|
|
pylint
|
|
|
|
|
|
2021-10-29 12:44:11 +00:00
|
|
|
[testenv]
|
2021-07-13 15:45:57 +00:00
|
|
|
commands =
|
2022-05-13 20:36:55 +00:00
|
|
|
pytest --cov=src/djlint --cov-branch --cov-report xml:coverage.xml --cov-report term-missing {posargs:} -n auto --dist loadgroup
|
|
|
|
|
skip_install: false
|
2022-09-12 07:58:45 +00:00
|
|
|
allowlist_externals = pytest
|
2022-05-13 20:36:55 +00:00
|
|
|
|
|
|
|
|
[testenv:test-fast]
|
|
|
|
|
commands =
|
|
|
|
|
pytest -n 4
|
2021-09-08 08:53:19 +00:00
|
|
|
skip_install: false
|
2022-09-12 07:58:45 +00:00
|
|
|
allowlist_externals = pytest
|