forked from AdaCore/e3-core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtox.ini
76 lines (69 loc) · 2.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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
[tox]
envlist = py38-cov-xdist
[testenv]
deps =
pytest
pytest-html
ansi2html
xdist: pytest-xdist[psutil]
pytest-socket
mock
# httpretty version 1.0.0 seems to be buggy, crash at install time
httpretty != 1.0.0
pyyaml
cov: pytest-cov
cov: coverage
codecov: codecov
passenv = APPVEYOR* CI GITHUB_* CODECOV_*
extras = config
# Run testsuite with coverage when '-cov' is in the env name
commands=
{envpython} {toxinidir}/tests/gen-cov-config.py {toxinidir}/.coveragerc
py.test --ignore=build -vv --html=pytest-report.html --self-contained-html \
xdist: -n auto \
--disable-socket \
ci: --ci \
cov: --cov={envsitepackagesdir}/e3 --cov-report= --cov-fail-under=0 --cov-branch \
[]
cov: {envpython} {toxinidir}/tests/fix-coverage-paths.py \
cov: {envsitepackagesdir} {toxinidir}/.coverage
cov: coverage html --fail-under=0
cov: coverage report
codecov: codecov
[testenv:security]
# Run bandit checks. Accept yaml.load(), pickle, and exec since this
# is needed by e3. Also temporarly accept sha1 usage until this is replaced by
# more secure alternative. There is also e3.env.tmp_dir that returns the TMPDIR
# environment variable. Don't check for that.
deps =
bandit
safety
commands =
bandit -r e3 -ll -ii -s B102,B108,B301,B303,B506
safety check --full-report
[testenv:docs]
deps =
pytest
mock
httpretty
sphinx
sphinx-autoapi
sphinx_rtd_theme
commands =
py.test --collect-only --requirement-coverage-report={toxinidir}/docs/source/requirement_coverage.yaml
python docs/generate-req-coverage.py {toxinidir}/docs/source/requirements.yaml \
{toxinidir}/docs/source/requirement_coverage.yaml \
{toxinidir}/docs/source/requirement_coverage.rst
python -msphinx -M html {toxinidir}/docs/source {toxinidir}/docs/build
[pytest]
addopts = --failed-first
markers =
git: git needs to be installed to run these tests
svn: svn needs to be installed to run these tests
[flake8]
exclude = .git,__pycache__,build,dist,.tox
ignore = A003, C901, E203, E266, E501, W503,D100,D101,D102,D102,D103,D104,D105,D106,D107,D203,D403,D213
# line length is intentionally set to 80 here because black uses Bugbear
# See https://github.com/psf/black/blob/master/README.md#line-length for more details
max-line-length = 80
select = A,ANN,B,B9,BLK,C,D,E,F,ISC,RST,T4,W