-
Notifications
You must be signed in to change notification settings - Fork 2
/
tox.ini
60 lines (56 loc) · 1.73 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
[tox]
envlist = pep8,unit_tests_2,unit_tests_3,python_lint_3
skipsdist = True
# Note: this fails on at least some 2.x versions of tox!
toxworkdir = {env:SP_BINDINGS_TOX_WORKDIR:{toxinidir}/.tox}
[testenv:unit_tests_2]
basepython = python2
deps =
confget >= 2.2.0, < 6
ddt != 1.4.0
mock >= 1, < 4
pytest >= 4, < 5
six >= 1.9, < 2
commands = pytest {posargs} unit_tests
[testenv:unit_tests_3]
basepython = python3
deps =
confget >= 2.2.0, < 6
ddt != 1.4.0
mock >= 1, < 6
pytest >= 7, < 8
six >= 1.9, < 2
commands = pytest {posargs} unit_tests
# Disabled flake8 tests:
# - E501 (line too long): until the spdoc issues are sorted out
# - E128 (under-indented): only for the JsonObject definitions in sptypes
#
[testenv:pep8]
basepython = python3
deps =
flake8 >= 5, < 7
commands =
flake8 --exclude=spapi.py,sptypes.py storpool scripts
flake8 --ignore=E128,E203,E501 storpool/spapi.py storpool/sptypes.py
flake8 --ignore=E203,W503 setup.py unit_tests
# Disabled pylint 3 tests:
# - C0209 (consider-using-f-string): Python 2.x does not support f-strings
# - C0330 (bad-continuation): we use black-like formatting
# - W0707 (raise-missing-from): Python 2 does not support "raise err from orig"
# - R0205 (useless-object-inheritance): Python 2 needs it
# - R1725 (super-with-arguments): Python 2 needs super() arguments
#
# pylint-2.5.0 does not like the JSONEncoder class; fix it later.
#
[testenv:python_lint_3]
basepython = python3
deps =
confget >= 2.2.0, < 6
ddt != 1.4.0
mock >= 1, < 6
pylint >= 2.12, < 2.14
pytest >= 7, < 8
six >= 1.9, < 2
commands =
pylint --disable=C0209,C0330,W0707,R0205,R1725, --ignore=spapi.py,sptype.py,sptypes.py,sputils.py storpool unit_tests
pylint --ignored-modules=distutils setup.py