Skip to content

Fix coverage collection for empty --cov values - #768

Merged
ionelmc merged 2 commits into
pytest-dev:masterfrom
xlyy1:fix-empty-cov-source
Oct 18, 2026
Merged

ionelmc merged 2 commits into
pytest-dev:masterfrom
xlyy1:fix-empty-cov-source

Conversation

@xlyy1

@xlyy1 xlyy1 commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Passing --cov= leaves an empty source name, so coverage collects no files even when .coveragerc sets source.

Normalize the empty value to the existing bare --cov behavior and update the configuration example.

Validation: all six new regression cases fail before the fix and pass afterward. On Windows with Python 3.13.13, the full suite had 209 passed, 6 skipped, and 1 pre-existing duplicate-plugin registration failure. Changed-file pre-commit checks, strict Sphinx build, and package checks passed. The full pre-commit run hit a Taplo schema retrieval timeout; the documentation link check did not pass because of existing broken links and GitHub rate limits.

@ionelmc
ionelmc force-pushed the fix-empty-cov-source branch from a81fc4f to 8823b4f Compare October 18, 2026 16:54
@ionelmc
ionelmc merged commit 051793b into pytest-dev:master Oct 18, 2026
1 check was pending
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants