-
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathtox.ini
154 lines (142 loc) · 4.02 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
# Generated from:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
[tox]
minversion = 3.18
envlist =
lint
py{39,310,311,312,313}-{integration,unit}
buildout
coverage
# Not enabled by default:
# black
[testenv]
# Set the defaults for all test environments.
# Override in [testenv:env-name] where needed.
usedevelop = false
skip_install = true
# example.ploneintegration depends on plone.autoinclude,
# and 'deps' is handled before 'usedevelop', so we need '.' in the deps.
# Also, we want all test packages in development mode,
# otherwise when you make a change, you must recreate the environment.
deps =
zope.testrunner
-e .
-e test-packages/example.basetestpackage
-e test-packages/example.addon
-e test-packages/example.different
-e test-packages/example.different2
-e test-packages/example.metaoverrides
-e test-packages/example.ploneaddon
-e test-packages/example.plone-dash-addon
-e test-packages/example.ploneintegration
-e test-packages/example.zopeaddon
-e test-packages/example.zopeintegration
-e test-packages/example.multipleeps
-e test-packages/ExampleCamelCase
-e test-packages/namespaceexample.native
-e test-packages/namespaceexample.pkgutilns
# extras =
# test
# Paths for integration tests: run only the tests of the test packages.
# Do not run plone.autoinclude tests.
integration_testpaths =
# With --test-path=test-packages we find no tests.
# Only paths to the src directories work.
--test-path=test-packages/example.addon/src \
--test-path=test-packages/example.different/src \
--test-path=test-packages/example.different2/src \
--test-path=test-packages/example.metaoverrides/src \
--test-path=test-packages/example.ploneaddon/src \
--test-path=test-packages/example.ploneintegration/src \
--test-path=test-packages/example.zopeaddon/src \
--test-path=test-packages/example.zopeintegration/src \
--test-path=test-packages/example.multipleeps/src \
--test-path=test-packages/namespaceexample.native/src \
--test-path=test-packages/namespaceexample.pkgutilns/src
[testenv:py{39,310,311,312,313}-integration]
# Integration tests: run only the tests of the test packages.
# Do not run plone.autoinclude tests.
commands =
zope-testrunner {[testenv]integration_testpaths} []
extras =
test
[testenv:py{39,310,311,312,313}-unit]
usedevelop = true
skip_install = false
deps =
zope.testrunner
commands =
zope-testrunner --test-path=src
extras =
test
[testenv:lint]
basepython = python3
skip_install = true
deps =
flake8
check-manifest
check-python-versions
commands =
flake8 src test-packages setup.py
check-manifest
check-python-versions
[testenv:coverage]
basepython = python3
allowlist_externals =
mkdir
deps =
{[testenv]deps}
coverage
coverage-python-version
commands =
mkdir -p {toxinidir}/parts/htmlcov
coverage run -m zope.testrunner {[testenv]integration_testpaths} --test-path=src []
coverage html
coverage report -m --fail-under=80
[coverage:run]
branch = True
plugins = coverage_python_version
source = src/plone/autoinclude
[coverage:report]
precision = 2
exclude_lines =
pragma: no cover
pragma: nocover
except ImportError:
raise NotImplementedError
if __name__ == '__main__':
self.fail
raise AssertionError
[coverage:html]
directory = parts/htmlcov
[testenv:black]
basepython = python3
skip_install = true
deps =
isort
black
commands =
isort src test-packages setup.py
black src test-packages setup.py
[testenv:release]
basepython = python3
skip_install = true
deps =
zest.releaser[recommended]
plone.releaser
commands =
fullrelease
[testenv:buildout]
basepython = python3
skip_install = true
setenv =
deps =
pip == 25.0.1
setuptools == 75.8.0
zc.buildout == 4.0.0
commands_pre =
python -m pip list
{envbindir}/buildout -nc {toxinidir}/buildout.cfg buildout:directory={envdir}
commands =
{envbindir}/test-unit {posargs:-cv}
{envbindir}/test-integration {posargs:-cv}