Enable run-time type checking during tests

This commit is contained in:
Unrud 2020-10-04 15:13:02 +02:00 committed by Unrud
parent 73e42f8101
commit 12fe5ce637
2 changed files with 2 additions and 2 deletions

View File

@ -6,7 +6,7 @@ python-tag = py3
[tool:pytest]
# More options are set in `setup.py` via environment variable `PYTEST_ADDOPTS`
addopts = --flake8 --isort --cov --cov-report=term --cov-report=xml -r s
addopts = --flake8 --isort --typeguard-packages=radicale --cov --cov-report=term --cov-report=xml -r s
norecursedirs = dist .cache .git build Radicale.egg-info .eggs venv
[tool:isort]

2
setup.py Executable file → Normal file
View File

@ -52,7 +52,7 @@ WEB_FILES = ["web/internal_data/css/icon.png",
needs_pytest = {"pytest", "test", "ptr"}.intersection(sys.argv)
pytest_runner = ["pytest-runner"] if needs_pytest else []
tests_require = ["pytest-runner", "pytest", "pytest-cov", "pytest-flake8",
"pytest-isort", "waitress"]
"pytest-isort", "typeguard", "waitress"]
os.environ["PYTEST_ADDOPTS"] = os.environ.get("PYTEST_ADDOPTS", "")
# Mypy only supports CPython
if sys.implementation.name == "cpython":