Re: Ordering tests in a testsuite

2010-10-08 Thread Mike Kent
But sometimes you just wanna do it the way you wanna do it. If you name your tests like 'test_01_yadda' and test_02_whatever', then they will be run in the order you want, as given by the numbers. -- http://mail.python.org/mailman/listinfo/python-list

Re: Ordering tests in a testsuite

2010-10-07 Thread Steven D'Aprano
On Fri, 08 Oct 2010 08:35:12 +1100, Ben Finney wrote: > Ulrich Eckhardt writes: > >> However, sometimes it doesn't make sense to run test_bar() if >> test_foo() already failed, because they basically build upon each >> other. > > That's a mistake. If the success of ‘test_bar’ depends on the res

Re: Ordering tests in a testsuite

2010-10-07 Thread Ben Finney
Ulrich Eckhardt writes: > However, sometimes it doesn't make sense to run test_bar() if > test_foo() already failed, because they basically build upon each > other. That's a mistake. If the success of ‘test_bar’ depends on the result of ‘test_foo’, then it's not an independent test and therefore

Re: Ordering tests in a testsuite

2010-10-07 Thread Peter Otten
Ulrich Eckhardt wrote: > I'm currently working on a testsuite using Python's unittest library. This > works all good and fine, but there's one thing where I haven't seen an > elegant solution to yet, and that is the ordering. Currently, it takes all > classes and orders them alphabetically and the

Ordering tests in a testsuite

2010-10-07 Thread Ulrich Eckhardt
Hello! I'm currently working on a testsuite using Python's unittest library. This works all good and fine, but there's one thing where I haven't seen an elegant solution to yet, and that is the ordering. Currently, it takes all classes and orders them alphabetically and then takes all test functio