Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Result's mix_stderr conflates an empty stderr with not having separate streams #1193

Closed
Julian opened this issue Dec 26, 2018 · 0 comments
Closed
Labels
Milestone

Comments

@Julian
Copy link
Contributor

Julian commented Dec 26, 2018

In trying to move to click's new support for not mixing stdout and stderr, I encountered that click misinterprets an empty stderr as not having asked to not mix stdout and stderr.

https://github.com/pallets/click/blob/20a2bd8a13/click/testing.py#L105-L106 looks like the offending lines.

Failing test case:

import click
from click.testing import CliRunner
@click.command()
def cli_empty_stderr():
    click.echo("stdout")

runner = CliRunner(mix_stderr=False)

result = runner.invoke(cli_empty_stderr)

assert result.output == 'stdout\n'
assert result.stdout == 'stdout\n'
assert result.stderr == ''
Julian added a commit to Julian/click that referenced this issue Dec 26, 2018
Julian added a commit to Julian/click that referenced this issue May 3, 2019
@jcrotts jcrotts added this to the 7.1 milestone May 6, 2019
Julian added a commit to Julian/click that referenced this issue Aug 28, 2019
Julian added a commit to Julian/click that referenced this issue Aug 28, 2019
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 13, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

3 participants