check-black
check-isort
py3
+ coverage
skipsdist = true
skip_missing_interpreters = true
--recursive \
--ignore-local-config
+[coverage:report]
+omit =
+ */tests/*
+ */test_*.py
+ */templates/*
+
[testenv]
setenv =
UNITTEST = true
pytest {posargs:cephadm/tests/test_ssh.py}
+[testenv:coverage]
+setenv =
+ UNITTEST = true
+ PYTHONPATH = $PYTHONPATH:..
+deps =
+ {[base]deps}
+ pytest-cov
+# Default: percentages only
+# To show uncovered line numbers:
+# COVERAGE_REPORT=term-missing tox -e coverage -- <module>
+# To generate a nice html with visual uncovered line numbers:
+# COVERAGE_REPORT=html tox -e coverage -- <module>
+# <your-browser> htmlcov/index.html
+commands =
+ pytest --cov={posargs:.} --cov-report={env:COVERAGE_REPORT:term} {posargs:.}
+
+
[testenv:{,py37-,py38-,py39-,py310-}mypy]
setenv =
MYPYPATH = {toxinidir}/..:{toxinidir}/../../python-common