-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
is there a nice way to test click auto-completion functions? #1453
Comments
To trigger autocompletion, your shell calls your program with the Or test your autocompletion function directly, since Click's internals are already tested. An autocompletion function takes a Click's own tests use a somewhat internal function: https://github.com/pallets/click/blob/master/tests/test_bashcomplete.py. |
When I start it like this, I actually do not get my function output but something like
Do I miss something here? |
Nope, that's what autocompletion does, then the your shell takes that and actually handles the completion. You probably want to test your custom function, which the other two options do. |
Ok, got it ... using
actually does the job.... nice. And thanks @davidism |
Follow up to this, I mistyped. |
The current documentation is blank about this.
Is there maybe an example somewhere?
The text was updated successfully, but these errors were encountered: