This repository has been archived by the owner on Apr 6, 2023. It is now read-only.
forked from pex-tool/pex
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
215 lines (183 loc) · 4.84 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
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
[tox]
skip_missing_interpreters = True
minversion = 1.8
envlist =
py{py,27,37}-requests,style,isort-check,integration-tests
[testenv]
commands =
py.test --ignore="tests/test_integration.py" {posargs:-vvs}
# Ensure pex's main entrypoint can be run externally.
pex --cache-dir {envtmpdir}/buildcache . -e pex.bin.pex:main --version
deps =
pytest==3.7.2
list-tests: mock==2.0.0
py27: mock==2.0.0
pypy: mock==2.0.0
run: requests
requests: requests
requests: responses
cachecontrol: CacheControl
cachecontrol: lockfile
coverage: coverage==4.5.1
subprocess: subprocess32
passenv =
# These are to support directing test environments to the correct OpenSSL on OSX.
CPPFLAGS
LDFLAGS
whitelist_externals =
open
bash
git
[testenv:integration-tests]
deps =
tox
commands =
tox -e py27-integration -- {posargs:-vvs}
tox -e py37-integration -- {posargs:-vvs}
tox -e pypy-integration -- {posargs:-vvs}
[testenv:py27-integration]
commands =
py.test tests/test_integration.py {posargs:-vvs}
[testenv:py37-integration]
commands =
py.test tests/test_integration.py {posargs:-vvs}
[testenv:pypy-integration]
commands =
py.test tests/test_integration.py {posargs:-vvs}
[integration]
commands =
# This is necessary due to https://bitbucket.org/hpk42/tox/issue/175/cant-do-substitution-base-commands
bash scripts/coverage.sh
[testenv:list-tests]
commands = python scripts/list_tests.py
[testenv:py27-coverage]
commands = {[integration]commands}
[testenv:py27-requests-cachecontrol-coverage]
commands = {[integration]commands}
[testenv:py34-coverage]
commands = {[integration]commands}
[testenv:py34-requests-cachecontrol-coverage]
commands = {[integration]commands}
[testenv:py35-coverage]
commands = {[integration]commands}
[testenv:py35-requests-cachecontrol-coverage]
commands = {[integration]commands}
[testenv:py36-coverage]
commands = {[integration]commands}
[testenv:py36-requests-cachecontrol-coverage]
commands = {[integration]commands}
[testenv:py37-coverage]
commands = {[integration]commands}
[testenv:py37-requests-cachecontrol-coverage]
commands = {[integration]commands}
[testenv:pypy-requests-cachecontrol-coverage]
commands = {[integration]commands}
[testenv:py27-coverage-simple]
basepython = python2.7
commands =
coverage erase
coverage run -p -m py.test {posargs:}
coverage combine
coverage report
coverage html
open htmlcov/index.html
[testenv:coverage]
basepython = python2.7
deps =
coverage==4.0.3
tox
commands =
# meta
tox -e py27-coverage
tox -e py27-subprocess-requests-cachecontrol-coverage
tox -e py36-requests-cachecontrol-coverage
tox -e py36-coverage
tox -e pypy-subprocess-requests-cachecontrol-coverage
python scripts/combine_coverage.py
coverage report
coverage html
open htmlcov/index.html
[testenv:style]
basepython = python2.7
deps =
twitter.checkstyle
commands =
bash scripts/style.sh
[testenv:isort-run]
basepython = python2.7
deps =
isort==4.3.10
commands =
isort \
--recursive \
--dont-skip __init__.py \
--skip-glob {toxinidir}/pex/vendor/_vendored/** \
--skip {toxinidir}/pex/glibc.py \
--skip {toxinidir}/pex/pep425tags.py \
{toxinidir}/pex {toxinidir}/tests
[testenv:isort-check]
basepython = python2.7
deps =
{[testenv:isort-run]deps}
commands = {[testenv:isort-run]commands} -c
[testenv:vendor]
deps =
ansicolors==1.1.8
pip==18.1
redbaron==0.8
{[testenv:isort-run]deps}
commands =
python -m pex.vendor
{[testenv:isort-run]commands}
[testenv:vendor-check]
deps =
tox
commands =
tox -e vendor
git diff --quiet
[testenv:docs]
changedir = docs
deps =
sphinx
sphinx-rtd-theme
commands =
sphinx-build -b html -d {envtmpdir}/doctrees . _build/html
open _build/html/index.html
[testenv:py27-repl]
commands = python2.7
[testenv:py27-run]
commands = pex {posargs:}
[testenv:py37-run]
commands = pex {posargs:}
[testenv:package]
# TODO(John Sirois): Include subprocess32 when #415, #658 and #694 are resolved.
commands =
pex -v \
--cache-dir {envtmpdir}/buildcache \
--interpreter-constraint=">=3.4,<4" \
--interpreter-constraint="==2.7.*" \
--python-shebang="/usr/bin/env python" \
-o dist/pex \
-c pex \
requests .
# Would love if you didn't have to enumerate environments here :-\
[testenv:py27]
[testenv:py27-requests]
[testenv:py27-requests-cachecontrol]
[testenv:py27-subprocess]
[testenv:py34]
[testenv:py34-requests]
[testenv:py34-requests-cachecontrol]
[testenv:py35]
[testenv:py35-requests]
[testenv:py35-requests-cachecontrol]
[testenv:py36]
[testenv:py36-requests]
[testenv:py36-requests-cachecontrol]
[testenv:py37]
[testenv:py37-requests]
[testenv:py37-requests-cachecontrol]
[testenv:pypy]
[testenv:pypy-requests]
[testenv:pypy-requests-cachecontrol]
[testenv:pypy-subprocess]