Skip to content

Erase stale coverage before hatch test - #2349

Merged
cjames23 merged 2 commits into
pypa:masterfrom
floze-the-genius:agent/erase-stale-coverage
Jul 23, 2026
Merged

Erase stale coverage before hatch test#2349
cjames23 merged 2 commits into
pypa:masterfrom
floze-the-genius:agent/erase-stale-coverage

Conversation

@floze-the-genius

Copy link
Copy Markdown
Contributor

Summary

  • erase stale coverage data before running tests with coverage enabled
  • use the patched coverage configuration so custom data-file settings are respected
  • preserve custom test scripts and the existing quiet command output

Fixes #1984.

Validation

  • hatch fmt --check
  • hatch run types:check src/hatch/cli/test/__init__.py
  • hatch test --python 3.14 -- tests/cli/test/test_test.py -q (34 passed)
  • hatch test --python 3.14 --cover-quiet (2405 passed, 50 skipped)

AI assistance disclosure

OpenAI Codex was used extensively for repository analysis, implementation, regression-test updates, and validation.

@floze-the-genius

Copy link
Copy Markdown
Contributor Author

The CI matrix failure is unrelated to this PR's coverage cleanup. Every failing platform stops in hatch run types:check on the same two unchanged plugin-hook errors (CustomEnvironmentCollector and CustomBuildHook). The latest completed master test run (29471760769) fails on those exact two mypy errors as well, so this is a current baseline failure rather than a regression in the three changed files.

@cjames23 cjames23 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for contributing this!

@cjames23
cjames23 merged commit a82e427 into pypa:master Jul 23, 2026
49 checks passed
github-actions Bot pushed a commit that referenced this pull request Jul 23, 2026
Co-authored-by: Cary Hawkins <hawkinscary23@gmail.com> a82e427
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.

hatch test --cover does not erase coverage data

2 participants