forked from behave/behave
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
183 lines (167 loc) · 6.61 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
# ============================================================================
# TOX CONFIGURATION: behave
# ============================================================================
# DESCRIPTION:
#
# Use tox to run tasks (tests, ...) in a clean virtual environment.
# Tox is configured by default for offline usage.
# Initialize local workspace once (download packages, create PyPI index):
#
# tox -e init1
# tox -e init2 (alternative)
#
# Afterwards you can run tox in offline mode, like:
#
# tox -e py27
#
# NOTE:
# You can either use "local1" or "local2" as local "tox.indexserver.default":
#
# * $HOME/.pip/downloads/ (local1, default)
# * downloads/ (local2, alternative)
#
# SEE ALSO:
# * http://tox.testrun.org/latest/config.html
# ============================================================================
# NOTE:
# virtualenv >= 1.10 dropped support for python2.5
# Use virtualenv==1.9.1 if you need python2.5 support
# ============================================================================
# DISABLED: envlist = py25, due to dropped virtualenv support
# -- ONLINE USAGE:
# PIP_INDEX_URL = http://pypi.python.org/simple
# FAILING-ENVIRONMENTS: py32, py33
[tox]
minversion = 1.6.1
envlist = py26, py27, pypy, docs
sitepackages = False
indexserver =
default = file://{homedir}/.pip/downloads/simple
local1 = file://{toxinidir}/downloads/simple
local2 = file://{homedir}/.pip/downloads/simple
pypi = https://pypi.python.org/simple
# -----------------------------------------------------------------------------
# TOX PREPARE/BOOTSTRAP: Initialize local workspace for tox off-line usage
# -----------------------------------------------------------------------------
[testenv:init1]
install_command = pip install -i https://pypi.python.org/simple --find-links downloads --no-index {packages}
changedir = {toxinidir}
skipsdist = True
commands=
{toxinidir}/bin/toxcmd.py mkdir {toxinidir}/downloads
pip install --download={toxinidir}/downloads -r requirements/all.txt
{toxinidir}/bin/make_localpi.py {toxinidir}/downloads
deps=
[testenv:init2]
install_command = pip install -i https://pypi.python.org/simple --find-links {homedir}/.pip/downloads --no-index {packages}
changedir = {toxinidir}
skipsdist = True
commands=
{toxinidir}/bin/toxcmd.py mkdir {homedir}/.pip/downloads
pip install --download={homedir}/.pip/downloads -r requirements/all.txt
{toxinidir}/bin/make_localpi.py {homedir}/.pip/downloads
deps=
# setenv =
# PIP_INDEX_URL = https://pypi.python.org/simple
# -----------------------------------------------------------------------------
# TEST ENVIRONMENTS:
# -----------------------------------------------------------------------------
[testenv]
install_command = pip install -U {opts} {packages}
changedir = {toxinidir}
commands=
nosetests {posargs:test}
behave --format=progress --tags=~@xfail {posargs:features}
behave --format=progress --tags=~@xfail {posargs:tools/test-features}
behave --format=progress --tags=~@xfail {posargs:issue.features}
deps=
nose>=1.1
mock>=1.0
PyHamcrest>=1.8
setenv =
PYTHONPATH = {toxinidir}
[testenv:docs]
basepython= python
changedir = docs
commands=
sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
deps=
-r{toxinidir}/requirements/docs.txt
[testenv:cleanroom]
changedir = {envdir}
commands=
behave --version
{toxinidir}/bin/toxcmd.py copytree ../../behave4cmd0 .
{toxinidir}/bin/toxcmd.py copytree ../../test .
{toxinidir}/bin/toxcmd.py copytree ../../features .
{toxinidir}/bin/toxcmd.py copytree ../../tools .
{toxinidir}/bin/toxcmd.py copytree ../../issue.features .
nosetests {posargs:test}
behave --format=progress --tags=~@xfail {posargs:features}
behave --format=progress --tags=~@xfail {posargs:tools/test-features}
behave --format=progress --tags=~@xfail {posargs:issue.features}
deps=
{[testenv]deps}
setenv =
PYTHONPATH = .:{envdir}
# ---------------------------------------------------------------------------
# OPTIONAL TEST ENVIRONMENTS:
# ---------------------------------------------------------------------------
# -- PREPARED: Fails currently in 2 tests with named_temporary_file.
[testenv:py25]
commands=
nosetests {posargs:test}
behave --format=progress --tags=~@xfail {posargs:tools/test-features}
deps=
{[testenv]deps}
simplejson
# -- TESTED-WITH: jython2.5.2
[testenv:jy25]
basepython= jython
commands=
nosetests {posargs:test}
behave --format=progress --tags=~@xfail {posargs:tools/test-features}
deps=
{[testenv]deps}
simplejson
# ---------------------------------------------------------------------------
# PYTHON3 TEST ENVIRONMENTS:
# ---------------------------------------------------------------------------
[py3_setup]
changedir = {envdir}
{toxinidir}/bin/toxcmd3.py copy ../../bin/behave* bin
{toxinidir}/bin/toxcmd3.py copytree ../../behave .
{toxinidir}/bin/toxcmd3.py copytree ../../behave4cmd0 .
{toxinidir}/bin/toxcmd3.py copytree ../../test .
{toxinidir}/bin/toxcmd3.py copytree ../../tools .
{toxinidir}/bin/toxcmd3.py copytree ../../features .
{toxinidir}/bin/toxcmd3.py copytree ../../issue.features .
{toxinidir}/bin/toxcmd3.py 2to3 -w -n --no-diffs behave4cmd0
{toxinidir}/bin/toxcmd3.py 2to3 -w -n --no-diffs test
{toxinidir}/bin/toxcmd3.py 2to3 -w -n --no-diffs tools
{toxinidir}/bin/toxcmd3.py 2to3 -w -n --no-diffs features
{toxinidir}/bin/toxcmd3.py 2to3 -w -n --no-diffs issue.features
[testenv:py32]
basepython= python3.2
changedir = {envdir}
commands=
{toxinidir}/bin/toxcmd3.py copytree ../../test .
{toxinidir}/bin/toxcmd3.py copytree ../../tools .
{toxinidir}/bin/toxcmd3.py 2to3 -w -n --no-diffs test
{toxinidir}/bin/toxcmd3.py 2to3 -w -n --no-diffs tools
nosetests {posargs:test}
# DISABLED: behave --format=progress --tags=~@xfail {posargs:features}
# DISABLED: behave --format=progress --tags=~@xfail {posargs:tools/test-features}
# DISABLED: behave --format=progress --tags=~@xfail {posargs:issue.features}
[testenv:py33]
basepython= python3.3
changedir = {envdir}
commands=
{toxinidir}/bin/toxcmd3.py copytree ../../test .
{toxinidir}/bin/toxcmd3.py copytree ../../tools .
{toxinidir}/bin/toxcmd3.py 2to3 -w -n --no-diffs test
{toxinidir}/bin/toxcmd3.py 2to3 -w -n --no-diffs tools
nosetests {posargs:test}
# DISABLED: behave --format=progress --tags=~@xfail {posargs:features}
# DISABLED: behave --format=progress --tags=~@xfail {posargs:tools/test-features}
# DISABLED: behave --format=progress --tags=~@xfail {posargs:issue.features}