Skip to content

Testing Documentation w/ stderr #385

@euan-cowie

Description

@euan-cowie

First Check

  • I added a very descriptive title to this issue.
  • I used the GitHub search to find a similar issue and didn't find it.
  • I searched the Typer documentation, with the integrated search.
  • I already searched in Google "How to X in Typer" and didn't find any information.
  • I already read and followed all the tutorial in the docs and didn't find an answer.
  • I already checked if it is not related to Typer but to Click.

Commit to Help

  • I commit to help with one of those options 👆

Example Code

runner = CliRunner(mix_stderr=False) # mix_stderr must to be set to False to access result.stderr

Description

In the Testing documentation there is a Tip 🔥 Box with the following Tip:

You could also check result.stderr for "standard error".

This is true, but only if one sets the extra arguments on the CliRunner - specifically runner = CliRunner(mix_stderr=False). I believe this should be made clear in the documentation, or otherwise the CliRunner can prevent the default mixing of stderr and stdout as provided by click.

Operating System

macOS

Operating System Details

No response

Typer Version

0.4.1

Python Version

3.9.9

Additional Context

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionQuestion or problem

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions