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

fixtures: stop using request.param_index in fixture cache key #12154

Merged
merged 1 commit into from
Mar 24, 2024

Conversation

bluetech
Copy link
Member

When param is not defined, param_index is always 0 (see _compute_fixture_value), so no point in using it besides adding some confusion.

When `param` is not defined, `param_index` is always 0 (see
`_compute_fixture_value`), so no point in using it besides adding some
confusion.
@bluetech bluetech merged commit cfc4cf0 into pytest-dev:main Mar 24, 2024
24 checks passed
@bluetech bluetech deleted the fixtures-cache-key-idx branch March 24, 2024 13:40
@altendky
Copy link
Member

altendky commented Jul 9, 2024

I am just starting to debug pytest-dev/pytest-twisted#176 and bisected back to this change. The OP says "param_index is always 0" but then the change sets the getattr() default to None instead of 0. I'll keep trying to understand my issue, but I figured I would ask about this discrepancy as well. Changing the default to 0 does make the pytest-twisted test succeed again.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants