Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Remove
prune_dependency_tree
and reusegetfixtureclosure
logic #11243base: main
Are you sure you want to change the base?
Remove
prune_dependency_tree
and reusegetfixtureclosure
logic #11243Changes from all commits
aa5d09d
bbf5949
80b4f8b
0b725e7
fc92f9f
08d8b71
0c163ec
8b75507
c8e5277
57ad1e8
120be26
5e02d9c
c72507c
7c56b16
20ea215
1491a6e
946c32b
c962339
95f53e3
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would prefer to keep returning a brand new
arg2fixturedefs
, and let the caller merge it with other dict if they want, rather than passing in a dict and fill it inside. This makes it clear what's input/output.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
But the second fixture closure computation needs
arg2fixturedefs
as input, otherwise it should compute it again which is expensive according to docstring:There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about this?
If
arg2fixturedefs
is none, we create one, populate it and return it. Otherwise we just use it and return it.Check warning on line 501 in src/_pytest/python.py
Codecov / codecov/patch
src/_pytest/python.py#L501
Check warning on line 1381 in src/_pytest/python.py
Codecov / codecov/patch
src/_pytest/python.py#L1381
Check warning on line 1566 in src/_pytest/python.py
Codecov / codecov/patch
src/_pytest/python.py#L1563-L1566
Check warning on line 1572 in src/_pytest/python.py
Codecov / codecov/patch
src/_pytest/python.py#L1572