Skip to content

BugFix #14329#14332

Open
Wintreist wants to merge 2 commits intopytest-dev:mainfrom
Wintreist:wintreist-bugfix-closest-marker
Open

BugFix #14329#14332
Wintreist wants to merge 2 commits intopytest-dev:mainfrom
Wintreist:wintreist-bugfix-closest-marker

Conversation

@Wintreist
Copy link
Copy Markdown

Closes #14329

Fixed the issue of getting the really closest label to the test. I abolished the priority of base classes over labels, but supported getting the usefixtures mark in reverse order (i.e. from the base class to the heir), since this is a unique case when you really need to call fixtures sequentially from the base class.

I did not add myself to the Authors, as I do not plan to be a pytest developer yet, I fixed the problem, as it interferes with my main project. Thanks

@psf-chronographer psf-chronographer bot added the bot:chronographer:provided (automation) changelog entry is part of PR label Mar 28, 2026
Wintreist and others added 2 commits April 7, 2026 18:11
@bluetech bluetech force-pushed the wintreist-bugfix-closest-marker branch from 4374480 to 5d467d3 Compare April 7, 2026 16:16
Copy link
Copy Markdown
Member

@bluetech bluetech left a comment

Choose a reason for hiding this comment

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

Thanks, the changes LGTM. I pushed a few tweaks.

I'll let others a few days to review, then merge.

Copy link
Copy Markdown
Member

@RonnyPfannschmidt RonnyPfannschmidt left a comment

Choose a reason for hiding this comment

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

Under strict pedantic this is a breaking change
Im a bit torn for the classification

@bluetech
Copy link
Copy Markdown
Member

bluetech commented Apr 7, 2026

Under strict pedantic every bug fix is a breaking change 😀

I think this case is sensible for a minor release. I don't actually expect the MRO thing to come up that much...

@bluetech
Copy link
Copy Markdown
Member

bluetech commented Apr 7, 2026

Maybe the usefixtures change could be a bit more disruptive, but it will be annoying to separate the two...

@RonnyPfannschmidt
Copy link
Copy Markdown
Member

The order of items changes slightly

That likes to break things

@bluetech
Copy link
Copy Markdown
Member

bluetech commented Apr 7, 2026

The order of items changes slightly

What items are you referring to here? The mark list items, or the Items (tests) order changing due to usefixture changes?

That likes to break things

Would you prefer to defer this PR to pytest 10?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bot:chronographer:provided (automation) changelog entry is part of PR

Projects

None yet

Development

Successfully merging this pull request may close these issues.

get_closest_marker is working unexpectedly

3 participants