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: inline some functions to streamline the code #12130

Merged
merged 6 commits into from Apr 27, 2024

Conversation

bluetech
Copy link
Member

The getfixturevalue code is split over several functions, but I find it mostly obscures the flow of the logic. This PR inlines _getnextfixturedef and _compute_fixture_value into _get_active_fixturedef which is now a single linear function, mostly. I did move some sanity checking code out of the function since it mostly distracts.

Copy link
Member

@nicoddemus nicoddemus left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!

@nicoddemus nicoddemus merged commit 835765c into pytest-dev:main Apr 27, 2024
24 checks passed
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.

None yet

2 participants