diff options
author | Neal Norwitz <nnorwitz@gmail.com> | 2007-05-11 05:55:15 +0000 |
---|---|---|
committer | Neal Norwitz <nnorwitz@gmail.com> | 2007-05-11 05:55:15 +0000 |
commit | d9841039dbd0e37746d46f6e46ce1d82b85a21b3 (patch) | |
tree | fee131464aef6441792a56cccf449f73306461e9 /Lib/test/regrtest.py | |
parent | 360496d9c0d3c943089efb1a4fe6c2be062b8601 (diff) | |
download | cpython-git-d9841039dbd0e37746d46f6e46ce1d82b85a21b3.tar.gz |
Don't ever report a failure when the sum of the reference count differences
are zero. This should help reduce the false positives.
The message about references leaking is maintained to provide as much
info as possible rather than simply suppressing the message at the source.
Diffstat (limited to 'Lib/test/regrtest.py')
-rwxr-xr-x | Lib/test/regrtest.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/regrtest.py b/Lib/test/regrtest.py index ce5f2f608e..00451514b4 100755 --- a/Lib/test/regrtest.py +++ b/Lib/test/regrtest.py @@ -682,9 +682,10 @@ def dash_R(the_module, test, indirect_test, huntrleaks): deltas.append(sys.gettotalrefcount() - rc - 2) print >> sys.stderr if any(deltas): - print >> sys.stderr, test, 'leaked', deltas, 'references' + msg = '%s leaked %s references, sum=%s' % (test, deltas, sum(deltas)) + print >> sys.stderr, msg refrep = open(fname, "a") - print >> refrep, test, 'leaked', deltas, 'references' + print >> refrep, msg refrep.close() def dash_R_cleanup(fs, ps, pic): |