Files
gpr/bindings/python/tox.ini
Nicolas Roche ce94db53ab Update black version
no-tn-check

Change-Id: I3d90fd44613532c235892e13110a5df60c471a9c
2022-06-01 09:43:17 +00:00

71 lines
1.9 KiB
INI

[tox]
envlist = py38-cov,checkstyle
[testenv]
deps =
pytest
mock
# httpretty version 1.0.0 seems to be buggy, crash at install time
httpretty != 1.0.0
pyyaml
e3-core
cov: pytest-cov
cov: coverage
codecov: codecov
passenv = APPVEYOR* TRAVIS TRAVIS_* CI
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 \
ci: --ci \
cov: --cov={envsitepackagesdir}/gpr2 --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]
# Use latest supported version of Python to run the style checks
basepython = python3.8
deps =
black==22.3.0
mypy
flake8
flake8-bugbear
flake8-builtins
flake8-comprehensions
flake8-docstrings
flake8-rst-docstrings
extras = config
commands =
black --diff {toxinidir}/src {toxinidir}/tests
flake8 {toxinidir}/src {toxinidir}/tests
mypy {toxinidir}/src {toxinidir}/tests
[testenv:security]
deps =
bandit
safety
commands =
bandit -r e3 -ll -ii -s B102,B108,B301,B303,B506
safety check --full-report
[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 = 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 = ANN,B,B9,BLK,C,D,E,F,T4,W