forked from usmqe/usmqe-tests
-
Notifications
You must be signed in to change notification settings - Fork 0
/
tox.ini
57 lines (49 loc) · 1.97 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
# This tox config file is used to check some parts of usmqe module itself
# (making sure that usmqe module works as expected) by running it's unit tests,
# it's not concerned with running usmqe integration tests (which are stored
# in ``usmqe_tests`` directory and which are concerned with testing of
# tendrl/ceph/gluster systems as a whole).
# For more information about tox, see https://tox.readthedocs.io/en/latest/
[tox]
envlist = py36,flake8,flake8-max-line
# Neither unit tests or flake8 check doesn't perform setuptools based
# installation, everything is executed on the source files direclty.
[testenv]
skip_install = true
# This environment checks how many test cases we have
[testenv:testcaselist]
basepython = python3.6
deps = -r{toxinidir}/requirements.txt
commands = {envpython} -m pytest --collect-only --ignore=usmqe_tests/rpm --ignore=usmqe_tests/demo usmqe_tests
# This enviroment runs usmqe unit tests in place
[testenv:py36]
basepython = python3.6
deps = -r{toxinidir}/requirements.txt
commands = {envpython} -m pytest -c unit_tests/pytest.ini -rx unit_tests
changedir = usmqe
setenv =
PYTHONPATH = {toxinidir}
sitepackages = true
skipsdist = true
# We follow PEP8, including the 80 chars as max line length, but we don't want
# to enforce 80 chars by force in all cases. Instead we try to follow the max
# line length, but if the readability would be affected, we allow line length
# up to 100 chars.
[testenv:flake8]
deps = flake8
commands = flake8 --max-line-length=100 --exclude=__pycache__,unit_tests usmqe usmqe_tests plugin
# This flake8 run checks E501 only (that lines are not larger than 80 chars)
# in warning only mode (the report is shown, but the outcome is ignored).
[testenv:flake8-max-line]
deps = flake8
commands = flake8 --select E501 usmqe usmqe_tests plugin
ignore_errors = true
ignore_outcome = true
# Check of sphinx docs build
[testenv:docs]
deps = sphinx
commands = make linkcheck
changedir = docs
skipsdist = true
sitepackages = true
whitelist_externals=make