-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
50 lines (43 loc) · 1.09 KB
/
tox.ini
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
[tox]
envlist = py311
isolated_build = True
[testenv]
usedevelop = True
[testenv:{test,coverage}]
setenv =
DJANGO_SETTINGS_MODULE=config.settings.test
skip_install = true
allowlist_externals = poetry
commands_pre =
poetry install --sync --only main --only test
commands:
test: poetry run pytest {tty:--color=yes} {posargs}
coverage: poetry run coverage run -m pytest
coverage: poetry run coverage html
[testenv:lint]
skip_install = true
allowlist_externals = poetry
commands_pre =
poetry install --sync --only lint
commands =
flake8
[testenv:{black}]
skip_install = true
allowlist_externals = poetry
commands_pre =
poetry install --sync --only format
commands =
black {posargs}
[testenv:{isort}]
skip_install = true
allowlist_externals = poetry
commands_pre =
poetry install --sync --only import-sort
commands =
isort {posargs}
[flake8]
max-line-length = 120
exclude = .tox,.git,*/migrations/*,*/settings/*,*/static/CACHE/*,docs,node_modules
[pycodestyle]
max-line-length = 120
exclude=.tox,.git,*/migrations/*,*/settings/*,*/static/CACHE/*,docs,node_modules