[Python-Dev] Re: Unittest list

Skip Montanaro skip@pobox.com
2002年4月10日 12:00:56 -0500


To get test coverage with gcc and gcov all you need to do is
 mkdir build.gcov
 cd build.gcov
 OPT="-fprofile-arcs -ftest-coverage" ../configure
 make 
 make quicktest
 for f in ../{Objects,Python,Modules}/*.c ; do
 gcov -o . $f
 done
I don't know if that's a script or not. I guess maybe it is... :-)
 >> By the way, is there a simmilar package that do the same thing for
 >> pure python programs? 
 Neal> There's 2 modules I know of:
 Neal> http://manatee.mojam.com/~skip/python/trace.py
 Neal> http://www.garethrees.org/2001/12/04/python-coverage/coverage.py
My trace.py stuff is actually in the distribution these days at
Tools/scripts/trace.py. It's languished since I first ripped off profile.py
to create it.
Skip

AltStyle によって変換されたページ (->オリジナル) /