beeware / cricket

A GUI tool for running Python test suites.
BSD 3-Clause "New" or "Revised" License
213 stars 69 forks source link

Handle output in stderr gracefully when discovering tests #6

Closed roadsideseb closed 11 years ago

roadsideseb commented 11 years ago

Discovering tests did fail as soon as there is output in stderr during the discovery process. This happened even when the output is just a INFO level log. To prevent this from happening, I have changed the Project model to collect the errors and only raise an exception if no test can be found and there are errors in stderr. Otherwise, stderr will be displayed in a stack trace dialog but allow to continue with the discovered tests.

I added a few tests for the discovery message. I am not quite sure about the format or your preference, so please let me know if there's anything that need to be changed. Also, I am not sure if the requirements_test.txt is the right way to deal with test-only dependencies. How do you want to handle that?

roadsideseb commented 11 years ago

I've update the PR according to your feedback after a rebase from master. Would you mind taking another look?

roadsideseb commented 11 years ago

I've updated the PR to reflect your feedback. It now has support for unittest2 for python < 2.7 through the cricket.compat module. It also contains the requested fixes.