Skip to content

docs: explain filesystem tests in frozen applications - #14789

Draft
Lem0nTea2002 wants to merge 1 commit into
pytest-dev:mainfrom
Lem0nTea2002:rook/pytest-14771-frozen-docs
Draft

docs: explain filesystem tests in frozen applications#14789
Lem0nTea2002 wants to merge 1 commit into
pytest-dev:mainfrom
Lem0nTea2002:rook/pytest-14771-frozen-docs

Conversation

@Lem0nTea2002

Copy link
Copy Markdown

Summary

  • Explain why tests stored only inside a PyInstaller PYZ archive are not visible to pytest's filesystem-based collectors.
  • Show how to bundle test sources as filesystem data with --add-data.
  • Resolve the bundled test directory relative to __file__ and pass that path to pytest.main().

Why

--pyargs can resolve importable packages, but pytest still needs filesystem paths when collecting Python test modules. The documentation now makes that boundary explicit and gives frozen applications a supported filesystem-backed layout.

Related to #14771.

Validation

  • uvx tox -e docs -- --show-traceback (256 documentation sources, warnings treated as errors)
  • targeted pre-commit hooks for both changed files
  • uvx towncrier build --draft --version 9.2.0
  • git diff --check

AI assistance

OpenAI Codex assisted with drafting the documentation change and running validation. The human contributor reviewed the complete diff and validation results before this draft pull request was opened and takes responsibility for the contribution.

@psf-chronographer psf-chronographer Bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Jul 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided (automation) changelog entry is part of PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant