#1269: fix a bug in pstats.add_callers() and add a unit test file for pstats.

This commit is contained in:
Georg Brandl 2008-01-21 10:24:59 +00:00
parent 2778c999e3
commit 66e7363c10
3 changed files with 31 additions and 1 deletions

View file

@ -512,7 +512,8 @@ def add_callers(target, source):
new_callers[func] = caller
for func, caller in source.iteritems():
if func in new_callers:
new_callers[func] = caller + new_callers[func]
new_callers[func] = tuple([i[0] + i[1] for i in
zip(caller, new_callers[func])])
else:
new_callers[func] = caller
return new_callers