-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
58 lines (50 loc) · 1.3 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 (https://tox.readthedocs.io/) is a tool for running tests in multiple virtual environments. This configuration
# file will run the test suite on all supported python versions. To use it, "pip install -r requirements.test.txt" and
# then run "tox" from this directory.
[tox]
envlist = flake8,mypy,clean,py38,report
[testenv]
deps = -rrequirements.test.txt
commands = coverage run --include='example/*' --branch -m unittest discover -s tests/
[testenv:report]
deps = coverage
skip_install = true
commands =
coverage report --skip-empty
coverage html --skip-empty --title="Example Coverage Report" -d htmlcov
[testenv:clean]
deps = coverage
skip_install = true
commands = coverage erase
[testenv:mypy]
deps = mypy
skip_install = true
commands = python -m mypy --config-file mypy.ini -p example -p tests
[testenv:flake8]
deps =
flake8
flake8-import-order
flake8-builtins
flake8-docstrings
skip_install = true
commands = flake8 example/ tests/
[flake8]
ignore = D107
max-complexity = 10
max-line-length = 120
import-order-style = pycharm
application-import-names = kx_core
application-package-names = kx_core
per-file-ignores =
example/__init__.py:F401,D104
*__init__.py:D104
exclude =
.tox,
.git,
__pycache__,
build,
dist,
*.pyc,
*.egg-info,
.cache,
.eggs