Skip to content

fix: prevent ValueError when accessing CliRunner.stderr - #746

Open
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/cli-runner-stderr-capture
Open

fix: prevent ValueError when accessing CliRunner.stderr#746
sentry[bot] wants to merge 1 commit into
mainfrom
seer/fix/cli-runner-stderr-capture

Conversation

@sentry

@sentry sentry Bot commented Aug 2, 2026

Copy link
Copy Markdown

The click.testing.CliRunner class defaults to mix_stderr=True, which means standard error is merged into standard output. When mix_stderr is True, the stderr_bytes attribute of the Result object remains None.

Attempting to access result.stderr when result.stderr_bytes is None raises a ValueError: stderr not separately captured.

This fix updates all instantiations of CliRunner() in the test suite to CliRunner(mix_stderr=False). This ensures that standard error is always captured separately, preventing the ValueError when result.stderr is accessed.

Fixes CLI-FR

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.

0 participants