Skip to content

Hide exec-helpers frames in pytest failure reports - #176

Open
penguinolog wants to merge 1 commit into
masterfrom
hide-exec-helpers-timeout-traceback
Open

penguinolog wants to merge 1 commit into
masterfrom
hide-exec-helpers-timeout-traceback

Conversation

@penguinolog

@penguinolog penguinolog commented Nov 3, 2026 •

Copy link
Copy Markdown
Collaborator

A timeout or an unexpected exit code already names the command and carries its output,
so the package frames in a pytest report only push the caller's line out of view.

  • Add _helpers.hide_traceback, which pytest calls through a module-level tracebackhide.
  • It hides the frame for an ExecHelperError and keeps it for any other exception.
  • Set tracebackhide in every module on the execute and check_call path.
  • test_timeout checks that no package frame is left; a new test checks that other errors keep them.

A timeout or an unexpected exit code already names the command and carries its output,
so the package frames in a pytest report only push the caller's line out of view.

- Add _helpers.hide_traceback, which pytest calls through a module-level __tracebackhide__.
- It hides the frame for an ExecHelperError and keeps it for any other exception.
- Set __tracebackhide__ in every module on the execute and check_call path.
- test_timeout checks that no package frame is left; a new test checks that other errors keep them.
@penguinolog
penguinolog requested a review from dis-xcom as a code owner November 3, 2026 19:26
@penguinolog penguinolog changed the title Hide exec-helpers frames in pytest failure reports A timeout or an unexpected exit code already names the command and carries its output, so the package frames in a pytest report only push the caller's line out of view. - Add _helpers.hide_traceback, which pytest calls through a module-level __tracebackhide__. - It hides the frame for an ExecHelperError and keeps it for any other exception. - Set __tracebackhide__ in every module on the execute and check_call path. - test_timeout checks that no package frame is left; a new test checks that other errors keep them. Hide exec-helpers frames in pytest failure reports Nov 3, 2026
@coveralls

Copy link
Copy Markdown
Collaborator

Coverage Report for CI Build 41703231015

Coverage increased (+0.05%) to 88.617%

Details

  • Coverage increased (+0.05%) from the base build.
  • Patch coverage: 11 of 11 lines across 7 files are fully covered (100%).
  • No coverage regressions found.

Uncovered Changes

No uncovered changes found.

Coverage Regressions

No coverage regressions found.


Coverage Stats

Coverage Status
Relevant Lines: 1930
Covered Lines: 1758
Line Coverage: 91.09%
Relevant Branches: 442
Covered Branches: 344
Branch Coverage: 77.83%
Branches in Coverage %: Yes
Coverage Strength: 6.96 hits per line

💛 - Coveralls

This branch has not been deployed

No deployments
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.

2 participants