summaryrefslogtreecommitdiff
path: root/tox.ini
blob: ca5d8b87a3a83b478fb5dd6e540fc5d37d05305e (plain)
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
[tox]
envlist = py27, py3, flake8, xenial
recreate = True

[testenv]
commands = python -m nose {posargs:tests/unittests}
deps = -r{toxinidir}/test-requirements.txt
       -r{toxinidir}/requirements.txt
setenv =
    LC_ALL = en_US.utf-8

[testenv:flake8]
basepython = python3
commands = {envpython} -m flake8 {posargs:cloudinit/ tests/ tools/}

# https://github.com/gabrielfalcao/HTTPretty/issues/223
setenv =
    LC_ALL = en_US.utf-8

[testenv:py3]
basepython = python3
commands = {envpython} -m nose {posargs:--with-coverage \
           --cover-erase --cover-branches --cover-inclusive \
           --cover-package=cloudinit tests/unittests}

[testenv:py26]
commands = nosetests {posargs:tests/unittests}
setenv =
    LC_ALL = C

[flake8]
#H102  Apache 2.0 license header not found
ignore=H404,H405,H105,H301,H104,H403,H101,H102
exclude = .venv,.tox,dist,doc,*egg,.git,build,tools

[testenv:doc]
basepython = python3
deps = {[testenv]deps}
       sphinx
commands = {envpython} -m sphinx {posargs:doc/rtd doc/rtd_html}

[testenv:xenial]
basepython = python3
deps =
    # requirements
    jinja2==2.8
    pyyaml==3.11
    PrettyTable==0.7.2
    oauthlib==1.0.3
    pyserial==3.0.1
    configobj==5.0.6
    requests==2.9.1
    # jsonpatch ubuntu is 1.10, not 1.19 (#839779)
    jsonpatch==1.10
    six==1.10.0
    # test-requirements
    httpretty==0.8.6
    mock==1.3.0
    nose==1.3.7
    unittest2==1.1.0
    contextlib2==0.5.1
    pep8==1.7.0
    pyflakes==1.1.0
    flake8==2.5.4
    hacking==0.10.2

[testenv:centos6]
basepython = python2.6
commands = nosetests {posargs:tests}
deps =
    # requirements
    argparse==1.2.1
    jinja2==2.2.1
    pyyaml==3.10
    PrettyTable==0.7.2
    oauthlib==0.6.0
    configobj==4.6.0
    requests==2.6.0
    jsonpatch==1.2
    six==1.9.0
    -r{toxinidir}/test-requirements.txt

[testenv:tip-pycodestyle]
commands = {envpython} -m pycodestyle {posargs:cloudinit/ tests/ tools/}
deps = pycodestyle

[testenv:tip-pyflakes]
commands = {envpython} -m pyflakes {posargs:cloudinit/ tests/ tools/}
deps = pyflakes