-
Notifications
You must be signed in to change notification settings - Fork 1
/
tox.ini
55 lines (49 loc) · 1.39 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
# tox (https://tox.readthedocs.io/) is a tool for running tests
# in multiple virtualenvs. This configuration file will run the
# test suite on all supported python versions. To use it, "pip install tox"
# and then run "tox" from this directory.
[tox]
envlist = py36, cov-report,cov-store
skipsdist = True
[testenv]
use_develop = true
install_command = pip install -i https://pypi.doubanio.com/simple {opts} {packages}
deps = -r{toxinidir}/requirements.txt
setenv =
COVERAGE_FILE = tests/.coverage.{envname}
PYTHONDONTWRITEBYTECODE = 1
TESTING_CONFIG = {toxinidir}/flask_cc_api/instance/testing.py
FLASK_ENV = development
commands = coverage run -m --source {toxinidir}/flask_cc_api pytest {toxinidir}/tests {toxinidir}/flask_cc_api
[testenv:cov-report]
skip_install = true
setenv =
COVERAGE_FILE = tests/.coverage
deps = -r{toxinidir}/requirements-cov.txt
commands =
coverage combine tests
coverage report
[testenv:cov-store]
skip_install = true
setenv =
COVERAGE_FILE = tests/.coverage
deps = -r{toxinidir}/requirements-cov.txt
commands = coverage html
[flake8]
ignore = E722
max-complexity = 10
max-line-length = 120
exclude =
tests/migrations/*,
migrations/*,
flask_cc_api/config/*,
flask_cc_api/views/__init__.py,
flask_cc_api/__init__.py,
.git,
.tox,
*.pyc,
__pycache__,
instance,
docs
[pytest]
addopts = -vvl --strict --flake8 --capture no