-
Notifications
You must be signed in to change notification settings - Fork 172
/
Copy pathtox.ini
101 lines (89 loc) · 2.2 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
[tox]
envlist = py36-django{22,30,31,32}
py37-django{22,30,31,32}
py38-django{22,30,31,32,40,41,42}
py39-django{22,30,31,32,40,41,42}
py310-django{32,40,41,42,50,51,master}
py311-django{41,42,50,51,master}
py312-django{42,50,51,master}
black
isort
flake8
docs
[gh-actions]
python =
3.6: py36
3.7: py37
3.8: py38
3.9: py39
3.10: py310
3.11: py311
3.12: py312, docs
[testenv]
setenv =
PYTHONPATH = {toxinidir}
PYTHONWARNINGS = all
PYTEST_ADDOPTS = --cov --cov-fail-under=85 --cov-report=xml --cov-report=term
# The dash ahead of the command allows djangomaster to fail and still return 0 (success)
commands =
!djangomaster: pytest {posargs}
djangomaster: -pytest {posargs}
deps =
django22: Django>=2.2,<2.3
django30: Django>=3.0a1,<3.1
django31: Django>=3.1,<3.2
django32: Django>=3.2,<4.0
django40: Django>=4.0,<4.1
django41: Django>=4.1,<4.2
django42: Django>=4.2,<5.0
django50: Django>=5.0,<5.1
django51: Django>=5.1,<5.2
djangomaster: https://github.com/django/django/archive/main.tar.gz
pytest-django
pytest-cov
[testenv:black]
skip_install = True
deps =
black
commands =
black {toxinidir} --check
[testenv:isort]
skip_install = True
deps =
isort
commands =
isort {toxinidir} --check-only
[testenv:flake8]
skip_install = True
deps =
flake8
commands =
flake8 {toxinidir} {posargs}
[testenv:docs]
allowlist_externals=make
changedir = docs
deps =
sphinx
commands =
make html
[pytest]
DJANGO_SETTINGS_MODULE = extra_views_tests.settings
python_files = tests.py test_*.py *_tests.py
[coverage:run]
branch = True
source = extra_views
[flake8]
max-complexity = 10
extend-exclude = extra_views_tests/migrations/, build/lib/, docs/conf.py, venv, .venv
ignore = W191, W503, E203
max-line-length = 88
[isort]
default_section = THIRDPARTY
known_first_party = extra_views
# black compatibility, as per
# https://black.readthedocs.io/en/stable/the_black_code_style.html?highlight=.isort.cfg#how-black-wraps-lines
multi_line_output = 3
include_trailing_comma = True
force_grid_wrap = 0
use_parentheses = True
line_length = 88