[XML-SIG] Re: [Python-Dev] test_minidom non-failure failure? (take 2)

Guido van Rossum guido@python.org
Thu, 12 Oct 2000 12:39:40 -0500

> On Thu, Oct 12, 2000 at 12:11:53PM -0400, Jeremy Hylton wrote:
> > I am getting an occasional, hard-to-reproduce error in test_minidom.
> > When I run the test, it displays about a thousand lines of garbage,
> > but the test suite does not report test_minidom as failed or skipped.
> > 
> > The output I see during the test run is this:
> > 
> > test_minidom
> > garbage: [{'nodeValue': u'Obsolete but implemented...', 'nextSibling':

> This is most likely the garbage collector.  regrtest.py contains
> the following code:
>         if findleaks:
>             gc.collect()
>             if gc.garbage:
>                 print "garbage:", repr(gc.garbage)
>                 found_garbage.extend(gc.garbage)
>                 del gc.garbage[:]
> findleaks is true if the -l option is specified (TESTOPS in the
> makefile includes it).  Something is producing cyclic garbage.

Of course something is producing cyclic garbage!

The DOM tree is full of parent and child links.

Does this output mean that the GC works correctly?  Or does it mean
that there is a reason why this garbage cannot be disposed of?

In the latter case, could that be because there are __del__ methods?

--Guido van Rossum (home page: http://www.python.org/~guido/)