228
by Scott Moser
add tox for easier testing |
1 |
[tox]
|
2 |
minversion = 1.6 |
|
3 |
skipsdist = True |
|
368
by Ryan Harper
Enable python coverage for unittests |
4 |
envlist = py27, py3, py3-flake8, py3-pylint, py27-pylint, trusty-check, coverage27, coverage3 |
228
by Scott Moser
add tox for easier testing |
5 |
|
6 |
[tox:jenkins]
|
|
7 |
downloadcache = ~/cache/pip |
|
8 |
||
9 |
[testenv]
|
|
10 |
usedevelop = True |
|
11 |
# LC_ALL see https://github.com/gabrielfalcao/HTTPretty/issues/223
|
|
12 |
setenv = VIRTUAL_ENV={envdir} |
|
13 |
LC_ALL = en_US.utf-8
|
|
14 |
deps = -r{toxinidir}/test-requirements.txt |
|
15 |
-r{toxinidir}/requirements.txt
|
|
230.1.3
by Scott Moser
disable test of parted, which is going away soon |
16 |
commands = {envpython} {toxinidir}/tools/noproxy nosetests {posargs} tests/unittests |
228
by Scott Moser
add tox for easier testing |
17 |
|
356.1.1
by Scott Moser
tox.ini: run with 'python3' rather than python3.4 or python3.5 |
18 |
[testenv:py3]
|
19 |
basepython = python3 |
|
20 |
||
228
by Scott Moser
add tox for easier testing |
21 |
# tox uses '--pre' by default to pip install. We don't want that, and
|
22 |
# 'pip_pre=False' isn't available until tox version 1.9.
|
|
23 |
install_command = pip install {opts} {packages} |
|
24 |
||
360
by Scott Moser
fix tox running for python2 on trusty |
25 |
[testenv:py2-flake8]
|
26 |
basepython = python2 |
|
27 |
deps = {[testenv]deps} |
|
28 |
flake8
|
|
29 |
commands = {envpython} -m flake8 {posargs:curtin} |
|
30 |
||
31 |
[testenv:py3-flake8]
|
|
32 |
basepython = python3 |
|
33 |
deps = {[testenv]deps} |
|
34 |
flake8
|
|
35 |
commands = {envpython} -m flake8 {posargs:curtin tests/vmtests} |
|
228
by Scott Moser
add tox for easier testing |
36 |
|
356.1.1
by Scott Moser
tox.ini: run with 'python3' rather than python3.4 or python3.5 |
37 |
[testenv:py3-pylint]
|
338.2.3
by Scott Moser
set base python to support trusty's tox |
38 |
# set basepython because tox 1.6 (trusty) does not support generated environments
|
356.1.1
by Scott Moser
tox.ini: run with 'python3' rather than python3.4 or python3.5 |
39 |
basepython = python3 |
333.1.1
by Scott Moser
add running of pylint for python27 and python34 |
40 |
deps = {[testenv]deps} |
365.1.2
by Ryan Harper
Further fixes: specify pylint version and restore use-case of handling args |
41 |
pylint==1.5.4
|
344.1.17
by Scott Moser
tox.ini: tests/vmtests now depends on simplstreams |
42 |
bzr+lp:simplestreams
|
338.2.2
by Scott Moser
force use of right python for pylint. |
43 |
commands = {envpython} -m pylint --errors-only {posargs:curtin tests/vmtests} |
333.1.1
by Scott Moser
add running of pylint for python27 and python34 |
44 |
|
45 |
[testenv:py27-pylint]
|
|
338.2.3
by Scott Moser
set base python to support trusty's tox |
46 |
# set basepython because tox 1.6 (trusty) does not support generated environments
|
47 |
basepython = python2.7 |
|
333.1.1
by Scott Moser
add running of pylint for python27 and python34 |
48 |
deps = {[testenv]deps} |
365.1.2
by Ryan Harper
Further fixes: specify pylint version and restore use-case of handling args |
49 |
pylint==1.5.4
|
338.2.2
by Scott Moser
force use of right python for pylint. |
50 |
commands = {envpython} -m pylint --errors-only {posargs:curtin} |
333.1.1
by Scott Moser
add running of pylint for python27 and python34 |
51 |
|
368
by Ryan Harper
Enable python coverage for unittests |
52 |
[testenv:coverage3]
|
53 |
envdir = {toxworkdir}/py34 |
|
54 |
commands = {envpython} {toxinidir}/tools/noproxy nosetests --with-coverage --cover-erase --cover-branches --cover-package=curtin --cover-inclusive {posargs} tests/unittests |
|
55 |
||
56 |
[testenv:coverage27]
|
|
57 |
envdir = {toxworkdir}/py27 |
|
58 |
commands = {envpython} {toxinidir}/tools/noproxy nosetests --with-coverage --cover-erase --cover-branches --cover-package=curtin --cover-inclusive {posargs} tests/unittests |
|
59 |
||
249.1.1
by Scott Moser
add docs rule to Makefile and 'tox -e docs' |
60 |
[testenv:docs]
|
61 |
deps = {[testenv]deps} |
|
62 |
sphinx
|
|
63 |
commands = |
|
64 |
sphinx-build -b html -d doc/_build/doctrees doc/ doc/_build/html
|
|
65 |
||
364
by Scott Moser
fix pep8 issue on trusty, add a tox environment to catch that. |
66 |
[testenv:trusty-check]
|
67 |
# this environment provides roughly a trusty build environment where
|
|
68 |
# where 'make check' is run during package build. This protects against
|
|
69 |
# package build errors on trusty where pep8 and pyflakes there have subtly
|
|
70 |
# different behavior. Note, we do only run pyflakes3, though.
|
|
71 |
basepython = python3 |
|
72 |
deps = pyflakes==0.8.1 |
|
73 |
pep8==1.4.6
|
|
74 |
commands = |
|
75 |
{toxinidir}/tools/run-pyflakes3 {posargs}
|
|
76 |
{toxinidir}/tools/run-pep8 {posargs}
|
|
77 |
||
228
by Scott Moser
add tox for easier testing |
78 |
[flake8]
|
79 |
builtins = _ |
|
80 |
exclude = .venv,.bzr,.tox,dist,doc,*lib/python*,*egg,build |