CleanCut / green

Green is a clean, colorful, fast python test runner.
MIT License
793 stars 75 forks source link

Implement setup.py runner #165

Closed althonos closed 7 years ago

althonos commented 7 years ago

PR for #158.

Allows running green with python setup.py green by declaring a distutils command in green.command.

The list of arguments is the same as the arguments of the plain green CLI, as it is dynamically generated using the StoreOpt results.

I had to change the behaviour of green.main a bit, to make it possible to pass it a custom argv. The command only validates the input arguments, and then passes everything to green.main.

Since distutils commands cannot have positional arguments, I made it possible to specify a test target to use using the test_suite argument in the setup.py.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.2%) to 99.8% when pulling 6bdca8db3c72bfcf38fbc4fb9cb0a5cebcb41b95 on althonos:feat-distcmd into 815dbcddda65c58c5613e2ca176fe22b3ddf6f4c on CleanCut:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.2%) to 99.8% when pulling 6bdca8db3c72bfcf38fbc4fb9cb0a5cebcb41b95 on althonos:feat-distcmd into 815dbcddda65c58c5613e2ca176fe22b3ddf6f4c on CleanCut:master.

coveralls commented 7 years ago

Coverage Status

Coverage decreased (-0.2%) to 99.8% when pulling 6bdca8db3c72bfcf38fbc4fb9cb0a5cebcb41b95 on althonos:feat-distcmd into 815dbcddda65c58c5613e2ca176fe22b3ddf6f4c on CleanCut:master.

CleanCut commented 7 years ago

Just a quick note: I have been traveling yesterday and today, and tomorrow is a holiday (in the United States), so I will probably find some time to review (and hopefully merge) this in a couple days. Sorry for the delay!

althonos commented 7 years ago

I'll add the doc, although I have the feeling it is quite dense already. I'd like to suggest a man page or an help with two levels (commands only / features); this goes out of the scope of the PR but I just wanted you to know that 😉

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling a3f41b1f08dd9b25c8d27af48fcc3b84a889c8b8 on althonos:feat-distcmd into 815dbcddda65c58c5613e2ca176fe22b3ddf6f4c on CleanCut:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling a3f41b1f08dd9b25c8d27af48fcc3b84a889c8b8 on althonos:feat-distcmd into 815dbcddda65c58c5613e2ca176fe22b3ddf6f4c on CleanCut:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling a3f41b1f08dd9b25c8d27af48fcc3b84a889c8b8 on althonos:feat-distcmd into 815dbcddda65c58c5613e2ca176fe22b3ddf6f4c on CleanCut:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling bbc01530fff9c5d4e2885951fbc63fa8fd4f8481 on althonos:feat-distcmd into 815dbcddda65c58c5613e2ca176fe22b3ddf6f4c on CleanCut:master.

coveralls commented 7 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 8c91d008bf7c0744eec5c6ac08c8e31a3af33507 on althonos:feat-distcmd into e38bcdea45e2894be90feceea9981e971f7f479c on CleanCut:master.

althonos commented 7 years ago

Build fails because of Travis, not me, seems like there is an infrastructure error.

CleanCut commented 7 years ago

I agree with you. Travis is the problem in this case.

Once again, great work!

CleanCut commented 7 years ago

Included in version 2.10.0, just released.

althonos commented 7 years ago

Great ! Thanks ;)