diff --git a/nox/virtualenv.py b/nox/virtualenv.py index 7bd468b4..a11fcb1c 100644 --- a/nox/virtualenv.py +++ b/nox/virtualenv.py @@ -483,7 +483,7 @@ def create(self) -> bool: cmd = [sys.executable, "-m", "virtualenv", self.location] if self.interpreter: cmd.extend(["-p", self._resolved_interpreter]) - elif self.venv_backend == "uv": + elif self.venv_backend == "uv": # pragma: >=3.8 cover cmd = [ "uv", "virtualenv", diff --git a/noxfile.py b/noxfile.py index 3ebed4b6..33e91878 100644 --- a/noxfile.py +++ b/noxfile.py @@ -42,7 +42,6 @@ def tests(session: nox.Session) -> None: "--cov=nox", "--cov-config", "pyproject.toml", - "--cov-report=", *session.posargs, env={"COVERAGE_FILE": f".coverage.{session.python}"}, ) @@ -66,7 +65,7 @@ def cover(session: nox.Session) -> None: if ON_WINDOWS_CI: return - session.install("coverage[toml]") + session.install("coverage[toml]", "covdefaults") session.run("coverage", "combine") session.run("coverage", "report", "--fail-under=100", "--show-missing") session.run("coverage", "erase") diff --git a/pyproject.toml b/pyproject.toml index 2903e4f9..a0fcacb4 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -97,11 +97,8 @@ log_cli_level = "info" testpaths = [ "tests" ] [tool.coverage.run] -branch = true omit = [ "nox/_typing.py" ] - -[tool.coverage.report] -exclude_lines = [ "pragma: no cover", "if TYPE_CHECKING:", "@overload" ] +plugins = [ "covdefaults" ] [tool.mypy] files = [ "nox/**/*.py", "noxfile.py" ] diff --git a/requirements-test.txt b/requirements-test.txt index f1771d2d..323561f2 100644 --- a/requirements-test.txt +++ b/requirements-test.txt @@ -1,9 +1,10 @@ +covdefaults flask myst-parser -pytest-cov pytest>=6.0 +pytest-cov +sphinx>=3.0 sphinx-autobuild sphinx-tabs -sphinx>=3.0 uv; python_version>='3.8' witchhazel