mirror of
https://github.com/python/cpython.git
synced 2025-08-02 08:02:56 +00:00
Report refleaks to stderr as the tests run as well as logging them
to a file.
This commit is contained in:
parent
800ba2375a
commit
e667e66507
1 changed files with 2 additions and 0 deletions
|
@ -508,6 +508,8 @@ def runtest(test, generate, verbose, quiet, testdir=None, huntrleaks=False):
|
||||||
deltas.append(sys.gettotalrefcount() - rc - 2)
|
deltas.append(sys.gettotalrefcount() - rc - 2)
|
||||||
print >>sys.stderr
|
print >>sys.stderr
|
||||||
if max(map(abs, deltas[-huntrleaks[1]:])) > 0:
|
if max(map(abs, deltas[-huntrleaks[1]:])) > 0:
|
||||||
|
print >>sys.stderr, test, 'leaked', \
|
||||||
|
deltas[-huntrleaks[1]:], 'references'
|
||||||
print >>refrep, test, 'leaked', \
|
print >>refrep, test, 'leaked', \
|
||||||
deltas[-huntrleaks[1]:], 'references'
|
deltas[-huntrleaks[1]:], 'references'
|
||||||
# The end of the huntrleaks hackishness.
|
# The end of the huntrleaks hackishness.
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue