]> granicus.if.org Git - python/commit
Fix several bugs and add two features.
authorJeremy Hylton <jeremy@alum.mit.edu>
Tue, 8 May 2001 04:20:52 +0000 (04:20 +0000)
committerJeremy Hylton <jeremy@alum.mit.edu>
Tue, 8 May 2001 04:20:52 +0000 (04:20 +0000)
commit66a7e57c7e8aab2bf187991aa5c2aa5e21b44c2c
tree2afdb975f12a07779e731604f1af148eaa1fb5a5
parent9c90105cb000dbda5dead81732322a27b62319bb
Fix several bugs and add two features.

Assertion error message had typos in arguments to string format.

.cover files for modules in packages are now put in the right place.

The code that generate .cover files seemed to prepend a "./" to many
absolute paths, causing them to fail.  The code now checks explicitly
for absolute paths and leaves them alone.

In trace/coverage code, recover from case where module has no __name__
attribute, when e.g. it is executed by PyRun_String().  In this case,
assign modulename to None and hope for the best.  There isn't anywhere
to write out coverage data for this code anyway.

Also, replace several sys.stderr.writes with print >> sys.stderr.

New features:

-C/--coverdir dir: Generate .cover files in specified directory
instead of in the directory where the .py file is.

-s: Print a short summary of files coverred (# lines, % coverage,
name)
Tools/scripts/trace.py