Re: [Pyunit-interest] code coverage module?
Brought to you by:
purcell
From: Steve P. <ste...@ya...> - 2000-12-02 09:53:37
|
Hi Jeremy, Thanks for the questions. Jeremy Hylton wrote: > I just saw the messages on the October archive about integrating a > code coverage library with PyUnit. I'm looking at PyUnit for a couple > of projects where code coverage of Python and C code would be useful. > > I have a bunch of questions: > > Does the PyCov tool do code coverage for Python or for C? For Python. When I looked at the source I got the impression it wasn't quite up to the standard of AMK's 'code_coverage.py', which is based on 'trace.py'. I'm not aware of any Python tools that can do C code coverage, but presumably there are C-specific tools for that. > Do you have a URL for it? The URL in the archive does not work. Ah, no. If that URL doesn't work, I'm not sure. > Have you looked at the trace tool in the Python 2.0 distribution? > It's the code coverage tool written by Skip Montonaro and Andrew > Dalke. Only to the extent that 'code_coverage.py' was based on it. Even as a die-hard Pythoneer I haven't looked into Python 2 yet because there's no widespread support for it yet in terms of RPMS and other packages for add-ons like PIL. (It looks like Guido et al have assumed that everyone will jump immediately to 2.0 but I think it's going to take a surprisingly long time.) > Has anything happened since the discussion in October? Yes. I spent a good few hours investigating the whole code coverage topic and looking at different ways of collecting coverage information. My conclusion was that the most accurate way to deduce the 'potentially runnable' set of lines in a given source file is using the method from 'code_coverage'. I was a little disheartened because it relies on byte code inspection, and would therefore not work out of the box with JPython. I hope sometime soon to take that module and integrate it with the rest of PyUnit. Even adding code coverage reports in the GUI should not be too tricky. The difficulty is availability of hacking time due to a full-time project I'm undertaking now, and a lot of related travelling. Very best wishes, -Steve -- Steve Purcell, Pythangelist "Life must be simple if *I* can do it" -- me |