-
Notifications
You must be signed in to change notification settings - Fork 27
/
tox.ini
91 lines (84 loc) · 2.71 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
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
[tox]
envlist = lint,py{36,37,38,39,310}-{extras,noextras},pep8py3,doc,coverage-report
skip_missing_interpreters = true
[testenv]
# Coverage for CLI and server causes flaky tests on Travis CI
# setenv =
# CUSTODIAPYTHON = {envpython} -m coverage run --parallel
# passenv = CUSTODIAPYTHON
deps =
pytest
coverage
pip >= 19.1.1
extras: .[test_extras]
noextras: .[test]
# Makefile and RPM spec set sitepackages=True
sitepackages = False
commands =
{envpython} -bb -m coverage run -m pytest --capture=no --strict-markers {posargs}
[testenv:coverage-report]
deps = coverage
skip_install = true
commands =
{envpython} -m coverage combine
{envpython} -m coverage report --show-missing
[testenv:lint]
basepython = python3
deps =
.[test_pylint]
commands =
{envpython} -m pylint -d c,r,i,W0613 -r n --notes= --disable=star-args \
--disable=W1406 --disable=W0707 --disable=W1514 \
src/custodia
# tox doesn't expand *.py and pylint treats ./tests/ as a package
{envpython} -m pylint -d c,r,i,W0613 -r n --notes= --disable=star-args \
--disable=W1406 --disable=W0707 --disable=W1514 \
tests/functional/base.py \
tests/functional/__init__.py \
tests/functional/test_basics.py \
tests/functional/test_container.py \
tests/functional/test_key.py \
tests/conftest.py \
tests/test_authenticators.py \
tests/test_cli.py \
tests/test_custodia.py \
tests/test_httpd.py \
tests/test_ipa.py \
tests/test_message_kem.py \
tests/test_misc.py \
tests/test_plugins.py \
tests/test_secrets.py \
tests/test_server.py \
tests/test_store.py \
tests/test_store_sqlite.py
[testenv:pep8py3]
basepython = python3
deps =
.[test_pep8]
commands =
{envpython} -m flake8
[testenv:doc]
basepython = python3
deps =
.[test_docs]
commands =
python setup.py check --restructuredtext --metadata --strict
{envpython} -m markdown README.md -f {toxworkdir}/README.md.html
{envpython} -m markdown API.md -f {toxworkdir}/API.md.html
{envpython} -m sphinx -v -W -b html -d {envtmpdir}/doctrees docs/source {envtmpdir}/html
{envpython} -m sphinx -W -b spelling -d {envtmpdir}/doctrees docs/source {envtmpdir}/html
[pytest]
norecursedirs = dist build .tox
python_files = tests/*.py
markers =
# use tox -- --skip-servertests to skip server tests
servertest: Integration tests start a local Custodia server
# Don't use pytest log capture
# https://docs.pytest.org/en/latest/logging.html
addopts=-p no:logging
[flake8]
exclude = .tox,*.egg,dist,build,docs/source
show-source = true
max-line-length = 79
ignore = N802,W503,N818
application-import-names = custodia