You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ci: capture coverage before pytest imports - #3358
Coverage CI misses cuda.core initialization executed while pytest parses warning filters, before pytest-cov starts tracing.
Run pytest through coverage run on Linux and Windows so tracing starts before pytest imports. Preserve accumulated data with --append and use dynamic_context = test_function for function-level attribution.
Updated coverage test runs on Linux and Windows to use shared coverage settings, including per-test context tracking.
Windows bindings tests now run through the same coverage workflow as the other package tests.
The coverage configuration now enables test-function contexts. Linux and Windows workflow steps run the package test suites through coverage run, append coverage data, and disable pytest-cov options.
Changes: Coverage execution
Layer / File(s)
Summary
Configure and run coverage .coveragerc, .github/workflows/coverage.yml
The coverage configuration enables test-function contexts. Linux and Windows test steps invoke pytest through coverage run and append coverage data. The cuda.core steps include comments about starting tracing before helper imports.
Suggested reviewers:mdboom, rwgk
Change: Bug fix
Merge Risk: Low · up to ddfc2
Coverage remains available, but identifying which tests exercised fixtures or parameterized cases becomes harder. This is a bounded follow-up risk.
- [ ] Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Reviewing files that changed from the base of the PR and between 4010017 and ddfc213.
Files selected for processing: 2
.coveragerc
.github/workflows/coverage.yml
Included review availability: This review used your included allowance. Your plan provides up to 12 included reviews per hour; 11 remain after this review.
Which lines in actual library code are affected by this. If they are small we can just annotate them. I'm worried the cost of going off of the well-traveled path (using the pytest-cov plugin as intended) may not be worth it.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Coverage CI misses cuda.core initialization executed while pytest parses warning filters, before pytest-cov starts tracing.
Run pytest through coverage run on Linux and Windows so tracing starts before pytest imports. Preserve accumulated data with --append and use dynamic_context = test_function for function-level attribution.