replacing __dict__ with an OrderedDict
Ethan Furman
ethan at stoneleaf.us
Fri Jan 6 09:13:43 EST 2012
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.
I believe unittest executes tests in alphabetical order, but it does not
display them in the same order when it prints error/fail results.
~Ethan~
More information about the Python-list
mailing list