summaryrefslogtreecommitdiff
path: root/tox.ini
blob: 631a27b9f2d408be78debf2b87faebb3d531f0da (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
[tox]
minversion = 2.0
envlist = pep8,py27
skipsdist = True

[base]
NAILGUN_REPO = git+https://github.com/openstack/fuel-web.git
NAILGUN_CONFIG = {toxinidir}/nailgun-test-settings.yaml
NAILGUN_BRANCH={env:ZUUL_BRANCH:master}

[testenv]
deps = -r{toxinidir}/test-requirements.txt
setenv = VIRTUAL_ENV={envdir}

[testenv:py27]
usedevelop = True
deps = {[testenv]deps}
       -r{toxinidir}/requirements.txt
       -e{[base]NAILGUN_REPO}@{[base]NAILGUN_BRANCH}#egg=nailgun[test]&subdirectory=nailgun
setenv = {[testenv]setenv}
         NAILGUN_CONFIG={[base]NAILGUN_CONFIG}

commands = py.test -v --junit-xml {toxinidir}/extension.xml {posargs}

[testenv:pep8]
commands = flake8 {posargs}

[testenv:venv]
commands = {posargs}

[flake8]
# E123, E125 skipped as they are invalid PEP-8.
# H101 - Don't force author's name on TODOs
# H304 is "No relative imports" error, required for extensions
show-source = True
ignore = E123,E125,H101,H304
builtins = _
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build