[Python-Dev] Re: Code coverage tool updated

Scott David Daniels Scott.Daniels at Acm.Org
Fri Nov 12 21:33:29 CET 2004


Walter Dörwald wrote:
>... There seems to be something wrong with the way trace.py starts
> the script.

I'm starting to loook at writing a dinky trace.py note/document as a
result of bug day, and I have seen two problems so far.  First, the
assert you removed, and second in class CoverageResults:

class CoverageResults:
     def __init__(self, counts=None, calledfuncs=None, infile=None,
                  callers=None, outfile=None):
         ...
           try:
               counts, calledfuncs, callers = \
                       pickle.load(open(self.infile, 'rb'))
               self.update(self.__class__(counts, calledfuncs, callers))
         ...

I suspect switching infile and callers in the parameter list will
give better results.  I don;t know enough about trace yet to build
a test for this problem.

-- Scott David Daniels
Scott.Daniels at Acm.Org



More information about the Python-Dev mailing list