Python Code Coverage Tools

about | archive


[ 2007-December-11 21:28 ]

If you want to compute code coverage for Python, use Figleaf. It requires Python 2.4. Here is my extremely brief quick start guide:

# Get the code
http://darcs.idyll.org/~t/projects/figleaf-latest.tar.gz
tar xvzf figleaf-latest.tar.gz

# Run your program with it
python figleaf-latest/bin/figleaf [your Python command here]

# Generate annotated source, and open it
python figleaf-latest/bin/figleaf2html .figleaf
open html/[your Python file name].html