-
Notifications
You must be signed in to change notification settings - Fork 2
/
tox.ini
62 lines (56 loc) · 1.46 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 = 1.8
skipsdist = True
envlist = py3,pep8
[testenv]
usedevelop = True
install_command = pip install -U {opts} {packages}
setenv = VIRTUAL_ENV={envdir}
PYTHONDONTWRITEBYTECODE = 1
LANGUAGE=en_US
LC_ALL=en_US.UTF-8
PYTHONWARNINGS=default::DeprecationWarning
TESTS_DIR=./tests/
deps =
-r{toxinidir}/requirements.txt
-r{toxinidir}/test-requirements.txt
commands =
stestr run {posargs}
passenv = http_proxy HTTP_PROXY https_proxy HTTPS_PROXY no_proxy NO_PROXY
[testenv:pep8]
basepython = python3
whitelist_externals = bash
commands =
flake8 {posargs}
mypy hardlinkpy/ tests/
bash tools/check-black.sh {posargs}
[testenv:black]
# Environment to run 'black' on the code
basepython = python3
envdir = {toxworkdir}/pep8
whitelist_externals = bash
commands =
black --target-version py36 .
[testenv:cover]
basepython = python3
setenv = VIRTUAL_ENV={envdir}
LANGUAGE=en_US
PYTHON=coverage run --source hardlinkpy --omit='*tests*' --parallel-mode
commands =
coverage erase
stestr run {posargs}
coverage combine
coverage report --omit='*tests*'
coverage html -d ./cover --omit='*tests*'
[testenv:venv]
setenv = PYTHONHASHSEED=0
deps =
-r{toxinidir}/test-requirements.txt
commands = {posargs}
[flake8]
filename = *.py,app.wsgi
exclude = .venv,.git,.tox,dist,doc,*lib/python*,*egg,build
import-order-style = appnexus
application-import-names = hardlinkpy
max-complexity = 15
max-line-length = 88