Skip to content

Commit e47a651

Browse files
authored
chore: update coverage a bit (#1073)
Updating the setup for code coverage a bit, largely based on pypa/build's setup. Signed-off-by: Henry Schreiner <[email protected]>
1 parent 121143d commit e47a651

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

noxfile.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,7 @@ def _run_tests(
7272
if "--cov" in posargs:
7373
_extras.append("cov")
7474
posargs.append("--cov-config=pyproject.toml")
75+
env["COVERAGE_CORE"] = "sysmon"
7576

7677
install_arg = f"-e.[{','.join(_extras)}]"
7778
session.install(install_arg, *install_args, silent=False)

pyproject.toml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -214,8 +214,11 @@ messages_control.disable = [
214214
[tool.coverage]
215215
run.source = ["scikit_build_core"]
216216
run.omit = ["src/scikit_build_core/_vendor"]
217-
report.exclude_lines = [
218-
'pragma: no cover',
217+
run.disable_warnings = [
218+
"module-not-measured", # Triggers in multithreaded context on build
219+
"no-sysmon",
220+
]
221+
report.exclude_also = [
219222
'\.\.\.',
220223
'if typing.TYPE_CHECKING:',
221224
'if TYPE_CHECKING:',

0 commit comments

Comments
 (0)