[tox] skipsdist=True skip_missing_interpreters = True envlist = lint, unit, func [testenv] basepython = python3 setenv = PYTHONPATH = {toxinidir}:{toxinidir}/lib/:{toxinidir}/hooks/ passenv = HOME PATH CHARM_BUILD_DIR PYTEST_KEEP_MODEL PYTEST_CLOUD_NAME PYTEST_CLOUD_REGION PYTEST_MODEL MODEL_SETTINGS HTTP_PROXY HTTPS_PROXY NO_PROXY SNAP_HTTP_PROXY SNAP_HTTPS_PROXY OS_REGION_NAME OS_AUTH_VERSION OS_AUTH_URL OS_PROJECT_DOMAIN_NAME OS_USERNAME OS_PASSWORD OS_PROJECT_ID OS_USER_DOMAIN_NAME OS_PROJECT_NAME OS_IDENTITY_API_VERSION [testenv:lint] commands = flake8 black --check --exclude "/(\.eggs|\.git|\.tox|\.venv|\.build|dist|charmhelpers|mod|tests)/" . deps = black flake8 flake8-docstrings flake8-import-order pep8-naming flake8-colors [flake8] exclude = .git, __pycache__, .tox, charmhelpers, mod, .build max-line-length = 88 max-complexity = 14 [testenv:black] commands = black --exclude "/(\.eggs|\.git|\.tox|\.venv|\.build|dist|charmhelpers|mod|tests)/" . deps = black [testenv:unit] commands = coverage run -m unittest discover -s {toxinidir}/tests/unit -v coverage report --omit tests/*,mod/*,.tox/* coverage html --omit tests/*,mod/*,.tox/* deps = -r{toxinidir}/tests/unit/requirements.txt [testenv:func] changedir = {toxinidir}/tests/functional commands = functest-run-suite {posargs} deps = -r{toxinidir}/tests/functional/requirements.txt