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

Click integration #106

Open
italomaia opened this issue Apr 2, 2017 · 6 comments
Open

Click integration #106

italomaia opened this issue Apr 2, 2017 · 6 comments

Comments

@italomaia
Copy link

As flask now uses click, what about some integration?

@jcomo
Copy link
Collaborator

jcomo commented Apr 2, 2017

Can you be more specific about the feature set you would like to see?

@italomaia
Copy link
Author

What about we have something like:

flask test
flask test path.to.MyTest  # or
flask test-live path.to.MyTest  # or

@jcomo
Copy link
Collaborator

jcomo commented Apr 8, 2017

It's an interesting idea. I have trouble seeing what the command would provide that test runners would not (which is the recommended way to run flask tests). I suppose it could be a wrapper around the test runner, but I'd imagine that would be confusing. What do you think?

@italomaia
Copy link
Author

Ok, you're talking about this paragraph:

The nose collector and test runner works also fine with Flask-Testing.

I like the idea of having it as a test runner wrapper. Other packages (and/or flask-testing) could provide specially crafted test runner that could be extend flask-testing behavior that way. Imagine an setup like this:

FLASK_TESTING_RUNNER = 'package.module.Runner'
flask test

I believe it would feel quite natural for those using flask run. Also, the runner could be switched easely per enviroment or "type of test". Per example, I usually spread my code in blueprints that have their own package. I'm quite sure this setup would make my life simpler in more than one way.

Could you provide more insight about what could get more confusing?

@zgoda
Copy link

zgoda commented Nov 20, 2017

I wrote my own management script, see the test command -> https://github.com/zgoda/zakwasy/blob/master/manage.py#L37

This is adapted to Click from old code that used Flask-Script before.

@italomaia
Copy link
Author

italomaia commented Nov 20, 2017 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants