Skip to content

Strip pluggy/_pytest frames from --tb=native tracebacks in tests#4753

Merged
Zac-HD merged 1 commit into
HypothesisWorks:masterfrom
Zac-HD:claude/wizardly-bell-0SsUy
May 27, 2026
Merged

Strip pluggy/_pytest frames from --tb=native tracebacks in tests#4753
Zac-HD merged 1 commit into
HypothesisWorks:masterfrom
Zac-HD:claude/wizardly-bell-0SsUy

Conversation

@Zac-HD
Copy link
Copy Markdown
Member

@Zac-HD Zac-HD commented May 27, 2026

Our CI runs with --tb=native, which ignores pytest's usual traceback filtering and shows dozens of pluggy/_pytest hook frames above the actual test. Re-apply that filtering in a makereport hook by rebuilding the traceback from only the frames pytest would have kept.

Our CI runs with --tb=native, which ignores pytest's usual traceback
filtering and shows dozens of pluggy/_pytest hook frames above the actual
test. Re-apply that filtering in a makereport hook by rebuilding the
traceback from only the frames pytest would have kept.

https://claude.ai/code/session_017i7NGpHyr4AyhSTcrvFoqZ
@Zac-HD Zac-HD requested a review from Liam-DeVoe May 27, 2026 20:02
Copy link
Copy Markdown
Member

@Liam-DeVoe Liam-DeVoe left a comment

Choose a reason for hiding this comment

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

feels like pytest should have a traceback mode which does this, defined as "native styling, but we remove pytest-internal frames"..

@Zac-HD
Copy link
Copy Markdown
Member Author

Zac-HD commented May 27, 2026

yeah plausibly, but I don't want to wait for it. Will probably implement at the sprint.

@Zac-HD Zac-HD merged commit 644dada into HypothesisWorks:master May 27, 2026
77 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.

3 participants