flask-testing icon indicating copy to clipboard operation
flask-testing copied to clipboard

Click integration

Open italomaia opened this issue 8 years ago • 6 comments

As flask now uses click, what about some integration?

italomaia avatar Apr 02 '17 04:04 italomaia

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

jcomo avatar Apr 02 '17 05:04 jcomo

What about we have something like:

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

italomaia avatar Apr 02 '17 20:04 italomaia

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?

jcomo avatar Apr 08 '17 18:04 jcomo

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?

italomaia avatar Apr 09 '17 00:04 italomaia

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.

zgoda avatar Nov 20 '17 08:11 zgoda

L

.. L

Ll l a L

Em 20 de nov de 2017 5:39 AM, "Jarek Zgoda" [email protected] escreveu:

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.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/jarus/flask-testing/issues/106#issuecomment-345626507, or mute the thread https://github.com/notifications/unsubscribe-auth/AAA5TrbV_QKcGhRbDER4Agu6JNrA0Mxjks5s4TrDgaJpZM4Mwsww .

italomaia avatar Nov 20 '17 12:11 italomaia