PyCollector._genfunctions: use already created fixtureinfo#6636
PyCollector._genfunctions: use already created fixtureinfo#6636blueyed merged 1 commit intopytest-dev:masterfrom
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 |
RonnyPfannschmidt
left a comment
There was a problem hiding this comment.
at first glance this looks good to me,
seems like i missed this opportunity when adding function-definition first
RonnyPfannschmidt
left a comment
There was a problem hiding this comment.
based on the looks this is fine
Functioncreates a_fixtureinfoalready:https://github.com/pytest-dev/pytest/blob/fed535694/src/_pytest/python.py#L1392-L1395