Files
e3-aws/tox.ini
2021-02-11 16:52:44 +01:00

74 lines
2.0 KiB
INI

[tox]
envlist = py38-cov,checkstyle
[testenv]
deps =
awscli
e3-core
pytest
mock
requests_mock
httpretty
troposphere
cov: pytest-cov
codecov: codecov
passenv = APPVEYOR* TRAVIS TRAVIS_* CI
# 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 -v \
cov: --cov {envsitepackagesdir}/e3/aws --cov-report= --cov-fail-under=0 \
[]
cov: {envpython} {toxinidir}/tests/fix-coverage-paths.py \
cov: {envsitepackagesdir} {toxinidir}/.coverage
cov: coverage html --fail-under=0
cov: coverage report
codecov: codecov
[testenv:checkstyle]
basepython = python3
usedevelop = True
deps =
black==19.10b0
pyflakes>=1.2.3
pydocstyle>=1.0.0
pytest
mock
httpretty
prettytable
commands =
black -q --check {toxinidir}/src {toxinidir}/tests {toxinidir}/examples
pyflakes {toxinidir}/src {toxinidir}/tests {toxinidir}/examples
pydocstyle {toxinidir}/src {toxinidir}/tests {toxinidir}/examples
[testenv:security]
# Run bandit checks. Accept yaml.load(), pickle, and exec since this
# is needed by e3. There is also e3.env.tmp_dir that returns the TMPDIR
# environment variable. Don't check for that.
basepython = python3
deps =
bandit
safety
commands =
bandit -r src -ll -ii -s B102,B108,B301,B506
safety check --full-report
[pycodestyle]
ignore = E123,E133,E241,E242,W503,W504
[pydocstyle]
ignore = D100,D101,D102,D102,D103,D104,D105,D203,D403,D213
[pytest]
addopts = --failed-first
[flake8]
exclude = .git,__pycache__,build,dist,.tox
ignore = 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 = B,C,D,E,F,W,T4,B9