Skip to content

Fix scope resolution for parametrized fixtures using dict order#14070

Open
joddeepesh-cloud wants to merge 3 commits intopytest-dev:mainfrom
joddeepesh-cloud:fix-dict-order
Open

Fix scope resolution for parametrized fixtures using dict order#14070
joddeepesh-cloud wants to merge 3 commits intopytest-dev:mainfrom
joddeepesh-cloud:fix-dict-order

Conversation

@joddeepesh-cloud
Copy link

Fixes #13503

When all parametrized arguments are indirect, pytest determines the
narrowest scope from the fixtures involved. If fixture definitions
are provided as a dict, the previous logic could select an incorrect
scope.

This change ensures the correct scope is selected by using the last
fixture definition associated with each argument.

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Dec 28, 2025
@joddeepesh-cloud
Copy link
Author

Hi maintainers, this PR fixes #13503 by ensuring correct scope resolution
when fixture definitions are provided as a dict.
Please let me know if any changes are needed. Thanks!

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.

Failure output order of dictionary keys is alphabetical instead of insertion order

1 participant