59 lines
1.3 KiB
INI
59 lines
1.3 KiB
INI
[tox]
|
|
skipsdist = True
|
|
envlist = lint,unit
|
|
|
|
[testenv]
|
|
basepython = python3
|
|
setenv =
|
|
PYTHONPATH={toxinidir}
|
|
|
|
[testenv:unit]
|
|
deps =
|
|
pytest
|
|
ipdb
|
|
charms.unit_test
|
|
commands = pytest --tb native -s --show-capture=no --log-cli-level=INFO {posargs} {toxinidir}/tests/unit
|
|
|
|
[testenv:integration]
|
|
deps =
|
|
pytest
|
|
pytest-operator
|
|
ipdb
|
|
commands = pytest --tb native --show-capture=no --log-cli-level=INFO -s {posargs} {toxinidir}/tests/integration
|
|
|
|
[testenv:format]
|
|
deps =
|
|
black
|
|
commands =
|
|
black {toxinidir}/reactive {toxinidir}/tests
|
|
|
|
[testenv:lint]
|
|
deps =
|
|
flake8
|
|
black
|
|
mypy
|
|
commands =
|
|
flake8 {toxinidir}/reactive {toxinidir}/tests
|
|
black --check {toxinidir}/reactive {toxinidir}/tests
|
|
mypy --config-file={toxinidir}/tox.ini {toxinidir}/reactive
|
|
|
|
[testenv:validate-wheelhouse]
|
|
deps =
|
|
# Temporarily pin setuptools to avoid the breaking change from 58 until
|
|
# all dependencies we use have a chance to update.
|
|
# See: https://setuptools.readthedocs.io/en/latest/history.html#v58-0-0
|
|
# and: https://github.com/pypa/setuptools/issues/2784#issuecomment-917663223
|
|
setuptools<58
|
|
allowlist_externals = {toxinidir}/tests/validate-wheelhouse.sh
|
|
commands = {toxinidir}/tests/validate-wheelhouse.sh
|
|
|
|
[flake8]
|
|
max-line-length = 88
|
|
|
|
[mypy]
|
|
|
|
[mypy-charms.*]
|
|
ignore_missing_imports = True
|
|
|
|
[mypy-charmhelpers.*]
|
|
ignore_missing_imports = True |