-
Notifications
You must be signed in to change notification settings - Fork 26
/
Copy pathtox.ini
62 lines (54 loc) · 1.72 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
[tox]
minversion = 3.4.0
envlist = py36,py37,func,linters
skipsdist = True
[testenv]
usedevelop = True
setenv =
VIRTUAL_ENV={envdir}
PYTHONWARNINGS=default::DeprecationWarning
PYTHONDONTWRITEBYTECODE=1
OS_STDOUT_CAPTURE=1
OS_STDERR_CAPTURE=1
OS_TEST_TIMEOUT=60
ANSIBLE_ROLES_PATH={toxworkdir}/../etc/ansible/roles
ANSIBLE_INVENTORY_FILE={env:ANSIBLE_INVENTORY_FILE:/etc/ansible/hosts}
deps = -r{toxinidir}/test-requirements.txt
commands = pytest --cov=network_runner tests/ -v
[testenv:func]
basepython = python3
commands = python tests/functional.py {posargs}
[testenv:linters]
basepython = python3
commands = flake8 {posargs}
[testenv:cover]
whitelist_externals = coverage
basepython = python3
setenv =
VIRTUAL_ENV={envdir}
commands =
coverage run --source network_runner -m pytest
coverage html -d cover
coverage xml -o cover/coverage.xml
[testenv:docs]
basepython = python3
deps = -r{toxinidir}/doc/requirements.txt
-r{toxinidir}/requirements.txt
commands = python setup.py build_sphinx
[testenv:releasenotes]
basepython = python3
commands =
sphinx-build -a -E -W -d releasenotes/build/doctrees -b html releasenotes/source releasenotes/build/html
[flake8]
# E123, E125 skipped as they are invalid PEP-8.
show-source = True
# TODO(radez) research F821 and decide if it's safe to ignore long term
ignore = E123,E125,F821
builtins = _
exclude=.venv,.git,.tox,dist,doc,*lib/python*,*egg,build
# [H106] Don't put vim configuration in source files.
# [H203] Use assertIs(Not)None to check for None.
# [H204] Use assert(Not)Equal to check for equality.
# [H205] Use assert(Greater|Less)(Equal) for comparison.
# [H904] Delay string interpolations at logging calls.
enable-extensions=H106,H203,H204,H205,H904