-
Notifications
You must be signed in to change notification settings - Fork 40
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
pytest_cases.fixture unpack_into seems to invalidate scope argument #296
Comments
Good catch @lucapton ! This is because my current code in When it is a string it uses 'function' scope. It does not try to ask pytest's fixture manager for help. But fixing this would anyway not help in your situation, since the fixture So as a workaround I suggest to
Would you like to try this in a PR ? Otherwise, I'll do it one of these days, this seems fairly straightforward so that I can squeeze it into my agenda. |
I'm not familiar with the inner workings of pytest nor pytest_cases, so I don't think I can afford the time to do the PR, as much as I'd like to. I want to clarify that |
Very clear @lucapton , thanks! I'll see what I can do one of these days |
The example below causes a
ScopeMismatch
error despite everything beingsession
scoped.results in:
If you directly call
pytest_cases.unpack_into("a1, a2", a)
instead of the argument inpytest_cases.fixture
, then there there is no issue asa1
anda2
are correctly scoped tosession
instead offunction
.I'm getting these results using python 3.8.10, pytest 7.2.2, and pytest_cases 3.6.14 in an Ubuntu 20.04 docker container.
The text was updated successfully, but these errors were encountered: