-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
PyCollector._genfunctions: use already created fixtureinfo #6636
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
Conversation
`Function` creates a `_fixtureinfo` already: https://github.com/pytest-dev/pytest/blob/fed535694/src/_pytest/python.py#L1392-L1395
NOTE: I've not looked too closely at this, just noticed it via pdb'ing that it got called twice. |
I had checked it before approval, but decided to do a double check: They seem to be identical calls: Lines 1396 to 1398 in 1dc265e
and: Line 393 in 1dc265e
(
pytest/src/_pytest/fixtures.py Lines 303 to 339 in 1dc265e
and Line 415 in 1dc265e
So I think it is OK, althought the |
@nicoddemus |
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.
at first glance this looks good to me,
seems like i missed this opportunity when adding function-definition first
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.
based on the looks this is fine
Function
creates a_fixtureinfo
already:https://github.com/pytest-dev/pytest/blob/fed535694/src/_pytest/python.py#L1392-L1395