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

No documentation for how to test CLI commands #2511

Closed
fgblomqvist opened this issue Nov 6, 2017 · 3 comments · Fixed by #2611
Closed

No documentation for how to test CLI commands #2511

fgblomqvist opened this issue Nov 6, 2017 · 3 comments · Fixed by #2611
Milestone

Comments

@fgblomqvist
Copy link

There is currently no documentation for how to "officially" test Flask CLI commands. It seems appropriate that there should be a section about it on this page: http://flask.pocoo.org/docs/0.12/testing/.

I know there was a previous issue (#1709) that got closed, but I do believe it is an issue that there is no documentation on this very important topic. Furthermore, it is also very hard to find information about how to do it online (that old issue is literally the only page I found that is relevant).

@davidism
Copy link
Member

davidism commented Nov 6, 2017

Click is already documented, and Flask's CLI docs link to Click. http://click.pocoo.org/5/testing/

@fgblomqvist
Copy link
Author

Right, that's true. Tried to make sense of it in the flask context before but couldn't figure it out. Figured out how to do it a couple of days ago by combining information from several sources (and spending a couple of hours), so now it makes perfect sense. But it could just be that I didn't fully understand click before I suppose. If you think it's enough with the click docs, I understand.

@davidism
Copy link
Member

Flask 1.0 will add app.test_cli_runner to make this more straightforward. #2636

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants