Skip to content

Fix #8000: pytest_fixture_setup hook doesn't run for session scoped fixture#14283

Closed
devjaikalyani wants to merge 2 commits intopytest-dev:mainfrom
devjaikalyani:devagent/fix-8000-pytest-fixture-setup-hook-doesn-t-run-fo
Closed

Fix #8000: pytest_fixture_setup hook doesn't run for session scoped fixture#14283
devjaikalyani wants to merge 2 commits intopytest-dev:mainfrom
devjaikalyani:devagent/fix-8000-pytest-fixture-setup-hook-doesn-t-run-fo

Conversation

@devjaikalyani
Copy link

# Fix: `pytest_fixture_setup` hook runs for session-scoped fixtures

## Summary
The `pytest_fixture_setup` hook was incorrectly skipping execution for session-scoped fixtures, even though it should run for all fixture scopes.

## Changes
- Updated `testing/test_scope.py` to test session-scoped fixture behavior.
- Adjusted `pyproject.toml` (details in PR).

## Testing
- Added test case for session-scoped fixture in `test_scope.py`.
- Verified `pytest_fixture_setup` now executes for session-scoped fixtures.

## Closes #8000

Dev Jaikalyani and others added 2 commits March 11, 2026 15:42
@bluetech bluetech closed this Mar 11, 2026
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