diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-04-09 16:26:16 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-09 16:26:16 (GMT) |
commit | bb4447897a5f141eecf42987a1191a3330c5d7ed (patch) | |
tree | 4f70582c0cbbb16e5ac34c7d005765531d14c37c /Lib/test/libregrtest | |
parent | e65f01f78d7bda3013fc5be485afa87ff56511d9 (diff) | |
download | cpython-bb4447897a5f141eecf42987a1191a3330c5d7ed.zip cpython-bb4447897a5f141eecf42987a1191a3330c5d7ed.tar.gz cpython-bb4447897a5f141eecf42987a1191a3330c5d7ed.tar.bz2 |
bpo-36560: regrtest: don't collect the GC twice (GH-12747)
dash_R() function of libregrtest doesn't call support.gc_collect()
directly anymore: it's already called by dash_R_cleanup().
Call dash_R_cleanup() before starting the loop.
Diffstat (limited to 'Lib/test/libregrtest')
-rw-r--r-- | Lib/test/libregrtest/refleak.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/Lib/test/libregrtest/refleak.py b/Lib/test/libregrtest/refleak.py index 0bb8a0a..235d6bf 100644 --- a/Lib/test/libregrtest/refleak.py +++ b/Lib/test/libregrtest/refleak.py @@ -82,12 +82,14 @@ def dash_R(ns, the_module, test_name, test_func): print(("1234567890"*(repcount//10 + 1))[:repcount], file=sys.stderr, flush=True) + dash_R_cleanup(fs, ps, pic, zdc, abcs) + for i in rep_range: test_func() dash_R_cleanup(fs, ps, pic, zdc, abcs) - # Collect cyclic trash and read memory statistics immediately after. - support.gc_collect() + # dash_R_cleanup() ends with collecting cyclic trash: + # read memory statistics immediately after. alloc_after = getallocatedblocks() rc_after = gettotalrefcount() fd_after = fd_count() |