forked from jenisys/behave.example
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
112 lines (103 loc) · 3.96 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
# ============================================================================
# TOX CONFIGURATION: behave.example
# ============================================================================
# DESCRIPTION:
# Use tox to run tasks (tests, ...) in a clean virtual environment.
# Tox is configured by default for online usage (per default).
#
# To support offline usage, you can 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
# ============================================================================
# -- ONLINE USAGE:
# PIP_INDEX_URL = http://pypi.python.org/simple
# py.test --confcutdir=examples --basetemp={envtmpdir} {posargs}
# py.test --tb=line -v --junitxml=junit-{envname}.xml
[tox]
minversion = 1.8
envlist = py27, docs
sitepackages = False
indexserver =
default = https://pypi.python.org/simple
local1 = file://{toxinidir}/downloads/simple
local2 = file://{homedir}/.pip/downloads/simple
pypi = https://pypi.python.org/simple
# -----------------------------------------------------------------------------
# TEST ENVIRONMENTS: Bootstrap
# -----------------------------------------------------------------------------
# TOX PREPARE/BOOTSTRAP: Initialize local workspace for tox off-line usage
# install_command = pip install -i https://pypi.python.org/simple -f {toxinidir}/.extra/packages {packages}
[testenv:init1]
install_command = pip install -f {toxinidir}/.extra/packages {packages}
changedir = {toxinidir}
skipsdist = True
commands=
{toxinidir}/bin/toxcmd.py mkdir {toxinidir}/downloads
pip download --dest={toxinidir}/downloads -r requirements.txt
deps=
setenv =
PIP_INDEX_URL=https://pypi.python.org/simple
[testenv:init2]
install_command = pip install -f {toxinidir}/.extra/packages {packages}
changedir = {toxinidir}
skipsdist = True
commands=
{toxinidir}/bin/toxcmd.py mkdir {homedir}/.pip/downloads
pip download --dest={homedir}/.pip/downloads -r requirements.txt
deps=
setenv =
PIP_INDEX_URL=https://pypi.python.org/simple
# {toxinidir}/bin/make_localpi.py {toxinidir}/downloads
# {toxinidir}/bin/make_localpi.py {homedir}/.pip/downloads
# setenv =
# PIP_INDEX_URL = https://pypi.python.org/simple
# PIP_DOWNLOAD_DIR = {toxinidir}/downloads
# PIP_FIND_FILES = file://{toxinidir}/downloads
# -----------------------------------------------------------------------------
# TEST ENVIRONMENTS:
# -----------------------------------------------------------------------------
# -- PREPARED: changedir = {toxworkdir}/{envdir}
# WORKMARK: behave >= 1.2.4a1
[testenv]
install_command = pip install -f {toxinidir}/downloads -f {homedir}/.pip/downloads -U {opts} {packages}
commands=
{toxinidir}/bin/behave --format=progress --tags=~@xfail {posargs:} features
{toxinidir}/bin/behave --format=progress --tags=~@xfail {posargs:} datatype.features
{toxinidir}/bin/behave --format=progress --tags=~@xfail {posargs:} step_matcher.features
deps=
argparse >= 1.2; python_version <= '2.7'
behave >= 1.2.5
PyHamcrest >= 1.8
traceback2 >= 1.4.0; python_version <= '3.0'
[testenv:docs]
# install_command = pip install -f {toxinidir}/downloads -f {homedir}/.pip/downloads -U {opts} {packages}
basepython= python
changedir = {toxinidir}/docs
commands=
sphinx-build -W -b html -d {envtmpdir}/doctrees . {envtmpdir}/html
setenv=
TOXRUN=yes
deps=
{[testenv]deps}
sphinx>=1.4
sphinx_bootstrap_theme>=0.4.12
sphinxcontrib-programoutput
{toxinidir}/.extra/packages/sphinxcontrib-ansi-0.6.zip
# setenv =
# PATH="{toxinidir}/bin:$PATH"
# PIP_FIND_FILES = file://{homedir}/.pip/downloads