Skip to content
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

invocation-scoped fixtures #1681

Open
nicoddemus opened this issue Jun 27, 2016 · 6 comments
Open

invocation-scoped fixtures #1681

nicoddemus opened this issue Jun 27, 2016 · 6 comments
Assignees
Labels
type: enhancement new feature or API change, should be merged into features branch

Comments

@nicoddemus
Copy link
Member

Add support for "invocation" scoped fixtures, which will assume the scope of the requesting fixture. Each scope might have an independent cached-copy of a invocation scoped fixture.

@nicoddemus nicoddemus added the type: docs documentation improvement, missing or needing clarification label Jun 27, 2016
@nicoddemus nicoddemus added this to the 3.0 milestone Jun 27, 2016
@nicoddemus nicoddemus self-assigned this Jun 27, 2016
@nicoddemus nicoddemus removed the type: docs documentation improvement, missing or needing clarification label Jun 27, 2016
@nicoddemus nicoddemus reopened this Jul 6, 2017
@nicoddemus
Copy link
Member Author

As #1794 demonstrates, we had to pull that feature back in 707b6b5.

@nicoddemus nicoddemus removed this from the 3.0 milestone Aug 31, 2017
@nicoddemus nicoddemus added the type: enhancement new feature or API change, should be merged into features branch label Aug 31, 2017
@nicoddemus
Copy link
Member Author

This was reverted by #1811 just before the 3.0 release.

@blueyed
Copy link
Contributor

blueyed commented Mar 28, 2019

What's the state of this?
(I was about to file an issue adding monkeypatch_session as a temporary step gap (since while it is easy to create one yourself, the demand for this is high, and it always comes with a note that it might break in the future).)

@RonnyPfannschmidt
Copy link
Member

still deferred due to required internal refactoring

scorphus added a commit to scorphus/pytest-mock that referenced this issue Apr 13, 2020
While the feature proposed in pytest-dev/pytest#1681 is interesting and
would serve as base for a more elegant solution to pytest-dev#136, adding those
supplementary mockers allows this plugin to be used in other scopes.

Fix pytest-dev#136
scorphus added a commit to scorphus/pytest-mock that referenced this issue Apr 13, 2020
While the feature proposed in pytest-dev/pytest#1681 is interesting and
would serve as a base for a more elegant solution to pytest-dev#136, adding those
supplementary mockers allows this plugin to be used in other scopes.

Fix pytest-dev#136
@Sup3rGeo
Copy link
Member

Sup3rGeo commented Apr 29, 2020

Based on the discussion on #6354, I guess we are still waiting for the some refactoring?

I would love to see this happening and even willing to help, although probably I assume this refactoring should be relatively complex. What would be the refactoring needed?

EDIT: There is some discussion in #1794

@RonnyPfannschmidt
Copy link
Member

the basic gist is that its not clear whats needed for the refactoring, the current structures make incredibly hard to get right, we don't yet know what structures would make it simple

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: enhancement new feature or API change, should be merged into features branch
Projects
None yet
Development

No branches or pull requests

5 participants