[Tutor] problems with doctest: apparent interferance between tests (LONG)

John Ridley ojokimu at yahoo.co.uk
Sun Apr 10 16:05:45 CEST 2005


Hello Brian

I think the source of your problem is that the second instance of
Wall_clock doesn't get deleted in the interval doctest. This is
critical, because the is_instanced attribute is reset by __del__.

>   def interval(self, interval_name = None):
>       '''
>       >>> # print "Testing interval (intentional fail)."
>       >>> wc = Wall_clock()
>       >>> del(wc)
>       >>> wclock = Wall_clock()

As a quick hack, try adding the following line here:

        >>> wclock.__del__()

HTH

John Ridley

Send instant messages to your online friends http://uk.messenger.yahoo.com 


More information about the Tutor mailing list