Skip to content

add assertion to FixtureLookupError.formatrepr#12962

Merged
Zac-HD merged 2 commits intopytest-dev:mainfrom
jakkdl:fixturelookuperror_empty_stack
Nov 15, 2024
Merged

add assertion to FixtureLookupError.formatrepr#12962
Zac-HD merged 2 commits intopytest-dev:mainfrom
jakkdl:fixturelookuperror_empty_stack

Conversation

@jakkdl
Copy link
Member

@jakkdl jakkdl commented Nov 14, 2024

Broken out from #12930 where I originally was going to raise a FixtureLookupError but noticed that formatrepr crashed. I haven't researched thoroughly why it's currently making these assumptions, but it will crash if this assert doesn't hold - so thought I'd at least save some developer time in case anybody tries to use FixtureLookupError again (e.g. when #12930 turns into an error)

@jakkdl jakkdl added the skip news used on prs to opt out of the changelog requirement label Nov 14, 2024
@jakkdl jakkdl requested review from Zac-HD and nicoddemus November 14, 2024 14:32
Copy link
Member

@Zac-HD Zac-HD left a comment

Choose a reason for hiding this comment

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

Nice, thanks @jakkdl!

@Zac-HD Zac-HD added the type: refactoring internal improvements to the code label Nov 15, 2024
@Zac-HD Zac-HD merged commit 755083c into pytest-dev:main Nov 15, 2024
@jakkdl jakkdl deleted the fixturelookuperror_empty_stack branch November 15, 2024 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip news used on prs to opt out of the changelog requirement type: refactoring internal improvements to the code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants