Improve lookup/request to allow access to class instances from staticfunctions #3720
Labels
topic: fixtures
anything involving fixtures directly or indirectly
type: refactoring
internal improvements to the code
Follow up from #3705 (comment)
We would like to cleanup the
__being_called_by_pytest
keyword hack that was used in #3705. @RonnyPfannschmidt's suggestion of unwrapping the fixture function just before the call works great, except that for staticmethods we don't have access to instance request at that point.It seems like a deeper issue in the structural construction of the request: static test functions should still have
self
inrequest.instance
.The text was updated successfully, but these errors were encountered: