Skip to content

Clarify scoped fixture rerun support - #371

Open
LouisDeconinck wants to merge 2 commits into
pytest-dev:masterfrom
LouisDeconinck:docs/fixture-support-183
Open

Clarify scoped fixture rerun support#371
LouisDeconinck wants to merge 2 commits into
pytest-dev:masterfrom
LouisDeconinck:docs/fixture-support-183

Conversation

@LouisDeconinck

Copy link
Copy Markdown
Contributor

Fixes #183.

Clarify the currently supported fixture behavior in the README: setup failures and setup_class failures are rerun for class-, module-, package-, and session-scoped fixtures, while successful higher-scoped fixtures remain cached across a rerun and are torn down once afterward.

Add a package-scoped setup regression test and a towncrier documentation fragment.

Checks:

  • PYTHONPATH=src python3 -m pytest -q (227 passed, 9 skipped)
  • uvx --from pre-commit pre-commit run --files README.rst tests/test_pytest_rerunfailures.py changes/183.doc.rst
  • git diff --check

Comment thread tests/test_pytest_rerunfailures.py
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.

Clarification of class/module/package level fixture support

2 participants