Skip to content

Commit

Permalink
tests: use covdefaults
Browse files Browse the repository at this point in the history
Signed-off-by: Henry Schreiner <henryschreineriii@gmail.com>
  • Loading branch information
henryiii committed Feb 17, 2024
1 parent 98a55ca commit df522b1
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 9 deletions.
2 changes: 1 addition & 1 deletion nox/virtualenv.py
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
3 changes: 1 addition & 2 deletions noxfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -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}"},
)
Expand All @@ -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")
Expand Down
5 changes: 1 addition & 4 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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" ]
Expand Down
5 changes: 3 additions & 2 deletions requirements-test.txt
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit df522b1

Please sign in to comment.