Skip to content

docs: explain migration from coverage run to pytest-cov - #763

Open
xuu33030 wants to merge 1 commit into
pytest-dev:masterfrom
xuu33030:docs/482-coverage-migration
Open

xuu33030 wants to merge 1 commit into
pytest-dev:masterfrom
xuu33030:docs/482-coverage-migration

Conversation

@xuu33030

Copy link
Copy Markdown

Summary

  • Add a README section for coverage.py users explaining why switching from coverage run -m pytest to pytest --cov can change imports and reported coverage.
  • Recommend installing the package rather than depending on the working directory on sys.path, and point to the existing subprocess migration note.
  • Add the changelog entry and author attribution requested by CONTRIBUTING.

Closes #482.

Verification

  • In a clean temporary environment, coverage run -m pytest reported CWD on sys.path, whereas pytest --cov did not (same test file, both passed).
  • sphinx-build -b html -n -W docs <scratch-output>: passed before and after the change with no warnings.
  • git diff --check: passed.

This is a documentation-only change; the project's full tox matrix was not run. AI-assisted contribution; I reviewed the documentation, checked the behavior with an isolated reproducer, and ran the documentation build.

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.

Docs: Have a section for issues users coming from coverage may experience, surface it on or near the front page.

1 participant