On 01/06/2012 08:48 PM, Ulrich Eckhardt wrote:
Hi!

The topic explains pretty much what I'm trying to do under Python
2.7[1]. The reason for this is that I want dir(SomeType) to show the
attributes in the order of their declaration. This in turn should
hopefully make unittest execute my tests in the order of their
declaration[2], so that the output becomes more readable and structured,
just as my test code (hopefully) is.

IMO that's a futile effort, first, because as you already know, the test should not rely on the order. If you want the result to be printed in a certain order, that's a display issue, not testing order issue. I guess you would have better luck doing what you want by customizing the TestResult or TestRunner.

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to