CleanCut / green

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

Run coverage without showing coverage report #148

Closed althonos closed 7 years ago

althonos commented 7 years ago

Hi ! First of all, great module, running a test suite has never been so good-looking ! I'm really looking forward to green supporting the load_tests protocol ;)

Just a small enhancement though, green allows running coverage, which is great, but there's no way to hide the coverage report. Since some developers use an external coverage reporting tool (Coveralls, etc.) it would be great to be able to generate .coverage files without displaying the report ;)

I'll try to see if I can make a PR out of that, but since it's your code, you may be able to find the one parameter to change quicker than me ;)

CleanCut commented 7 years ago

This would be a great feature for you to try to implement. Very straightforward. You would need to add a new command-line option to green/config.py, an if-statement looking at that option at line 391 in green/result.py, and a test in green/test/test_result.py to test both branches of the if-statement.

The stuff in config.py is the trickiest, but if you search for all the instances of one of the other boolean options, you should be able to mimic what is done to it for your new one.

CleanCut commented 7 years ago

Good work! I released version 2.6.0 which includes your pull request.

althonos commented 7 years ago

Very straightforward indeed ! Thanks for reactivity on this 😃