-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
168 lines (145 loc) · 4.03 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
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
# tox configuration for django-auth_enhanced
[tox]
envlist =
py27-django111,
py{34,35,36}-django{111,20},
flake8
coverage-report
# don't require a setup.py
skipsdist = true
# don't stop on missing interpreters
skip_missing_interpreters = true
[testenv]
# TODO: This environment may have to be changed, once we're switching to testing the actual distribution
setenv =
PYTHONDONTWRITEBYTECODE=1
deps =
coverage
py27: mock
django111: Django>=1.11, <2.0
django20: Django>=2.0b1, <2.1
commands =
coverage run --parallel tests/runtests.py -v 0
[testenv:util]
basepython = python3
envdir = {toxworkdir}/util
deps =
coverage
flake8
isort
flake8-isort
Django>2.0b1
skip_install = true
commands =
{posargs:coverage run --parallel tests/runtests.py}
[testenv:django]
basepython = {[testenv:util]basepython}
envdir = {toxworkdir}/util
deps = {[testenv:util]deps}
skip_install = {[testenv:util]skip_install}
commands =
django-admin.py {posargs:version} --settings=tests.utils.settings_dev --pythonpath=./
[testenv:test]
basepython = {[testenv:util]basepython}
envdir = {toxworkdir}/util
deps = {[testenv:util]deps}
skip_install = {[testenv:util]skip_install}
commands =
coverage run --parallel tests/runtests.py {posargs}
[testenv:coverage-report]
basepython = {[testenv:util]basepython}
envdir = {toxworkdir}/util
deps = {[testenv:util]deps}
skip_install = {[testenv:util]skip_install}
commands =
- coverage combine
# coverage html
{posargs:coverage report}
[testenv:flake8]
basepython = {[testenv:util]basepython}
envdir = {toxworkdir}/util
deps = {[testenv:util]deps}
skip_install = {[testenv:util]skip_install}
commands =
flake8 . {posargs}
[testenv:isort]
basepython = {[testenv:util]basepython}
envdir = {toxworkdir}/util
deps = {[testenv:util]deps}
skip_install = {[testenv:util]skip_install}
commands =
isort . --recursive {posargs}
[testenv:doc]
basepython = {[testenv:util]basepython}
envdir = {toxworkdir}/doc
deps =
Sphinx
skip_install = true
changedir = {toxinidir}/docs
whitelist_externals = make
commands =
{posargs:make html}
[testenv:doc-srv]
basepython = {[testenv:doc]basepython}
envdir = {toxworkdir}/doc
deps = {[testenv:doc]deps}
skip_install = {[testenv:doc]skip_install}
changedir = {toxinidir}/docs/build/html
commands =
# python -m SimpleHTTPServer {posargs:8082} # Python2 command
python -m http.server {posargs:8082} # Python3 command
################################################################################
# The following sections actually provide settings for various tools
################################################################################
# This sections sets the options for coverage collecting
[coverage:run]
branch = True
source =
auth_enhanced
tests
omit =
*/__init__.py
*/migrations/*
*/tests/utils/*
*/tests/runtests.py
# This sections sets the options for coverage reporting
[coverage:report]
precision = 1
show_missing = True
fail_under = 95
# This section actually sets the options for flake8
[flake8]
exclude =
.git,
.tox,
migrations,
settings_dev.py,
# as per Django's Coding Style
# see https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/coding-style/
max-line-length = 119
ignore =
# as per Django's Coding Style
W601,
# This section actually sets the options for isort
[isort]
# these settings are taken from Django's isort configuration
# see https://github.com/django/django/blob/2.0.2/setup.cfg
combine_as_imports = True
default_section = THIRDPARTY
include_trailing_comma = True
line_length = 79
multi_line_output = 5
not_skip = __init__.py
# project specific isort options
known_first_party = auth_enhanced
known_django = django
sections = FUTURE, STDLIB, DJANGO, THIRDPARTY, FIRSTPARTY, LOCALFOLDER
import_heading_stdlib = Python imports
import_heading_django = Django imports
import_heading_firstparty = app imports
import_heading_localfolder = app imports
import_heading_thirdparty = external imports
skip_glob =
.tox,
*/migrations/*
settings_dev.py