mirror of
https://github.com/python/cpython.git
synced 2025-08-01 15:43:13 +00:00
#1269: fix a bug in pstats.add_callers() and add a unit test file for pstats.
This commit is contained in:
parent
2778c999e3
commit
66e7363c10
3 changed files with 31 additions and 1 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue