diff --git a/noxfile.py b/noxfile.py index 159e1cf..4507d49 100644 --- a/noxfile.py +++ b/noxfile.py @@ -106,7 +106,14 @@ def tests(session: nox.Session) -> None: speedup_dep = False install_deps(session, ",".join(["test", *extras])) - session.run("pytest", "--doctest-modules", *session.posargs) + session.run( + "pytest", + "--doctest-modules", + f"--cov={package.replace('-', '_')}", + "--cov-report", + "xml", + *session.posargs, + ) session.notify("cover") if speedup_dep: session.notify("speedup") diff --git a/pyproject.toml b/pyproject.toml index 54ba005..a34dcaa 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -216,7 +216,7 @@ skip = "__pycache__,_build,.mypy_cache,.git,./htmlcov,.nox,**/us_abbrs.py,cache" ignore-words-list = "gage,gages,paramss,trough" [tool.pytest.ini_options] -addopts = "--ignore=noxfile.py -n=auto -v --cov=py3dep --cov-report xml --durations=5" +addopts = "--ignore=noxfile.py -n=auto -v --durations=5" doctest_optionflags = 'NORMALIZE_WHITESPACE IGNORE_EXCEPTION_DETAIL NUMBER' filterwarnings = [ "ignore:.*distutils.*",