CleanCut / green

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

"No tests found" now results in a failure. #124

Closed dougthor42 closed 8 years ago

dougthor42 commented 8 years ago

Fixes #123.

This changes the return value and text coloring when no tests are found.

I wasn't able to figure out where any unit tests for this should go (I have limited time today), so if you could let me know where they should go, I'll try writing some tomorrow.

CleanCut commented 8 years ago

Tests for green/cmdline.py go in green/test/test_cmdline.py.

Tests for green/result.py go in green/test/test_result.py

dougthor42 commented 8 years ago

Alrighty, I updated things and added (well, modified) the relevant tests. I moved the logic for pass/fail out of cmdline.main() to the result.GreenTestResult.wasSuccessful() method so that things work everywhere.

I also squashed the commits so that you have a nice clean history (though there were only 2 commits originally...).

Once tests pass, I think it's ready to go. They passed locally so hopefully they do the same on CI.

coveralls commented 8 years ago

Coverage Status

Coverage remained the same at 100.0% when pulling 4d2fadd2075d5485731fe060cc01d279eb5bdff4 on dougthor42:no-tests-found-results-in-failure into 568e0240a41fe79af20bb520fef39062788aa09e on CleanCut:master.