Ticket #5787 enhancement closed fixed
trial --order for selecting an order for running test cases
|Reported by:||Julian||Owned by:||Julian|
(diff, github, buildbot, log)
|Author:||julian, tomprince||Launchpad Bug:|
Before you yell too loud, yes, I know test methods should be order independent. I also knowingly admit that as presented the patch is non-ideal, part of which due to me still not being familiar with all of trial's parts, so if someone's got a better idea for how to implement it I'm all ears.
That being said... when writing test cases I often happen to write them so that simpler tests are defined earlier in the test case. I therefore like to keep the test output in that order so that the tests that fail at the top are generally the ones that need addressing. Attached is a patch that attempts to implement that. In conjunction with #1518 which I really do hope to get to at some point though I keep putting it off, I think these two at least would help my personal workflow for fixing failing tests.
Open for criticism.
P.S., we could deprecate --random / -z and / or rename it to --order=random if that's something anyone would like.