Skip to content

Test failure in test_bad_config due to Click 8.2.0 breaking change #1308

@dogukancagatay

Description

@dogukancagatay

Describe the bug
The test_bad_config function in tests/test_cli.py fails due to a breaking change in Click 8.2.0 that affects how CliRunner handles stdout and stderr streams.

According to the Click 8.2.0 changelog, Click made a breaking change to CliRunner behavior:

Keep stdout and stderr streams independent in CliRunner. Always collect stderr output and never raise an exception. Add a new output stream to simulate what the user sees in its terminal. Removes the mix_stderr parameter in CliRunner.

Before Click 8.2.0: The CliRunner mixed stdout and stderr streams by default, making error messages accessible via result.stdout.

After Click 8.2.0: The CliRunner keeps stdout and stderr streams completely separate. Error messages from Typer (like "Unable to parse config") now go exclusively to result.stderr, while result.stdout remains empty.

OpenAPI Spec File
N/A

Desktop (please complete the following information):

  • OS: macOS 15.6.1, Fedora 43
  • Python Version: 3.13.7, 3.14.0rc2
  • openapi-python-client version 0.26.0

Additional context
No additional context.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions