Re: Repeated name of unit tests



On Fri, 2007-10-05 at 11:40 +0200, Maria Isabel Franco Trillo wrote:

> So, there are two solutions (in class UnitTestsObservers):
> 
> 1. Don't use class attribute for this. Only left self.unittests = [] in
> __init__ method and delete from here:
> 
> 	class UnitTestsObserver(buildstep.LogLineObserver):
> 	   unittests = []       --> delete this line
> 	   def __init__(self):
> 		self.unittests = []  --> add this line
> 
> If you don't delete indicated line, all will work like if this isn't exists because 
> while all references to this attribute are with self.unittests all works and class 
> attribute keeps itself empty.
> 
> 2. Use self.__class__.unittests = [] to restart in all instances.
> 
> 

Ah, I see... I think the first option is the best. Thanks a lot for
working on this. I'll fix this upstream too.

Iago




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]