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

[BUG] CliRunner invoke tests fail with Click 7.1 #59

Closed
daniel-hampton opened this issue Mar 10, 2020 · 2 comments
Closed

[BUG] CliRunner invoke tests fail with Click 7.1 #59

daniel-hampton opened this issue Mar 10, 2020 · 2 comments
Labels
bug Something isn't working

Comments

@daniel-hampton
Copy link

Describe the bug

Running tests with typer.testing.CliRunner invoke method with Click 7.1 installed results in failures with

__init__() got an unexpected keyword argument 'mix_stderr'

Forcing Click 7.0 installed fixes the issue.

Looks like mix_stderr keyword argument was removed from the invoke method.

7.0 invoke method:

    def invoke(self, cli, args=None, input=None, env=None,
               catch_exceptions=True, color=False, mix_stderr=False, **extra):

https://github.com/pallets/click/blob/a936b99212c69a36a2cc2828252b2c4280c0c88c/click/testing.py#L280

7.1 invoke method:

    def invoke(
        self,
        cli,
        args=None,
        input=None,
        env=None,
        catch_exceptions=True,
        color=False,
        **extra
    ):

https://github.com/pallets/click/blob/913ddf258dc973b79450f32169678f78770e1114/src/click/testing.py#L275

@daniel-hampton daniel-hampton added the bug Something isn't working label Mar 10, 2020
@tiangolo
Copy link
Owner

Thanks! Yep, there was a breaking change introduced in Click 7.1.0.

It is now fixed and released in Typer version 0.0.10 🎉 🚀

@github-actions
Copy link

Assuming the original issue was solved, it will be automatically closed now. But feel free to add more comments or create new issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants