beeware / cricket

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

Re-run with no failed tests gets confused about progress (and more) #18

Closed r1chardj0n3s closed 11 years ago

r1chardj0n3s commented 11 years ago

The progress bar falls about laughing in the face of a "Re-Run" when there were no failed tests. This is because it believes the number of tests to run are what project.find_tests returns as a count, but that will return 0 if there were no failed tests. It also returns no labels to restrict the test run to so the executor will run all tests.

Either Re-Run needs to be disabled in the face of no failures, or the above count issue needs to be addressed. I'd suggest disabling the button and re-labelling it "Re-Run Failures".

Similarly the "Run Selected" button should be disabled if there are no selected tests.

I'm also looking to add a binding for to (re-)run tests which will execute tests as though the user pressed the "Re-Run", or "Run Selected", or "Run All" button depending on the current state of the runner (ie. whether there are any failed tests, or any selected tests otherwise all tests.) It would highlight the active button in some way.

freakboy3742 commented 11 years ago

Confirmed - both bugs are real, and the proposed fixes sound reasonable to me.

r1chardj0n3s commented 11 years ago

OK, will do.