-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
57 lines (51 loc) · 1.87 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
[tox]
minversion = 3.18
envlist = py38,py310,pep8
skipsdist = True
[flake8]
# E125 is deliberately excluded. See https://github.com/jcrocholl/pep8/issues/126
# The rest of the ignores are TODOs
# New from hacking 0.9: E129, E131, H407, H405
# E251 Skipped due to https://github.com/jcrocholl/pep8/issues/301
ignore = C901,E117,E121,E122,E123,E124,E125,E126,E127,E128,E129,E131,E251,E402,H202,H216,H405,W503,W504,W605
exclude = .venv,.git,.tox,dist,doc,*openstack/common/*,*lib/python*,*egg,build,tools/xenserver*,releasenotes
# To get a list of functions that are more complex than 25, set max-complexity
# to 25 and run 'tox -epep8'.
# 34 is currently the most complex thing we have
# TODO(jogo): get this number down to 25 or so
max-complexity=35
[testenv]
usedevelop = True
# tox is silly... these need to be separated by a newline....
allowlist_externals = bash
find
rm
install_command = pip install -i https://pypi.tuna.tsinghua.edu.cn/simple {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
LANGUAGE=en_US
LC_ALL=en_US.utf-8
deps = -r{toxinidir}/test/requirements.txt
commands =
find ./casm -type f -name "*.pyc" -delete
[testenv:pycodestyle]
deps = hacking
commands =
pycodestyle casm/
[testenv:cover38]
basepython = python3.8
setenv =
PYTHON=coverage run --include=casm/* --parallel-mode --concurrency=eventlet
commands =
coverage erase
stestr --test-path=./casm/test/unit run '{posargs}'
coverage combine
coverage html --include='casm/*' --omit='casm/test/unit/*' -d cover/python3.8 -i
[testenv:cover310]
basepython = python3.10
setenv =
PYTHON=coverage run --include=casm/* --parallel-mode --concurrency=eventlet
commands =
coverage erase
stestr --test-path=./casm/test/unit run '{posargs}'
coverage combine
coverage html --include='casm/*' --omit='casm/test/unit/*' -d cover/python3.10 -i