summaryrefslogtreecommitdiff
path: root/Lib/test/libregrtest/refleak.py
Commit message (Collapse)AuthorAgeFilesLines
* [3.10] Fix typos in the Lib directory (GH-28775) (GH-28804)Christian Clauss2021-10-071-1/+1
| | | | | | | | Fix typos in the Lib directory as identified by codespell. Co-authored-by: Terry Jan Reedy <tjreedy@udel.edu>. (cherry picked from commit 745c9d9dfc1ad6fdfdf1d07420c6273ff67fa5be) Co-authored-by: Christian Clauss <cclauss@me.com>
* bpo-41718: Reduce libregrtest runtest imports (GH-24980)Victor Stinner2021-03-231-96/+1
| | | | | | Move clear_caches() from libregrtest.refleak to libregrtest.utils to avoid importing libregrtest.refleak when it's not needed. clear_caches() now only calls re.purge() if 're' is in sys.modules.
* bpo-40275: Use new test.support helper submodules in tests (GH-21772)Hai Shi2020-08-071-2/+4
|
* bpo-36725: regrtest: add TestResult type (GH-12960)Victor Stinner2019-04-261-2/+1
| | | | | | | | | | | | | | | * Add TestResult and MultiprocessResult types to ensure that results always have the same fields. * runtest() now handles KeyboardInterrupt * accumulate_result() and format_test_result() now takes a TestResult * cleanup_test_droppings() is now called by runtest() and mark the test as ENV_CHANGED if the test leaks support.TESTFN file. * runtest() now includes code "around" the test in the test timing * Add print_warning() in test.libregrtest.utils to standardize how libregrtest logs warnings to ease parsing the test output. * support.unload() is now called with abstest rather than test_name * Rename 'test' variable/parameter to 'test_name' * dash_R(): remove unused the_module parameter * Remove unused imports
* bpo-36560: regrtest: don't collect the GC twice (GH-12747)Victor Stinner2019-04-091-2/+4
| | | | | | 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.
* bpo-36560: Fix reference leak hunting in regrtest (GH-12744)Victor Stinner2019-04-091-26/+41
| | | | | | | | | | | | | | | | | | Fix reference leak hunting in regrtest: compute also deltas (of reference count, allocated memory blocks, file descriptor count) during warmup, to ensure that everything is initialized before starting to hunt reference leaks. Other changes: * Replace gc.collect() with support.gc_collect() * Move calls to read memory statistics from dash_R_cleanup() to dash_R() * Pass regrtest 'ns' to dash_R() * dash_R() is now more quiet with --quiet option (don't display progress). * Precompute the full range for "for it in range(repcount):" to ensure that the iteration doesn't allocate anything new. * dash_R() now is responsible to call warm_caches().
* bpo-36565: Fix libregrtest for Python without builtin _abc (GH-12733)Victor Stinner2019-04-091-2/+6
| | | | Fix reference hunting (``python3 -m test -R 3:3``) when Python has no built-in abc module: fix _get_dump() reimplementation of libregrtest.
* bpo-31333: Re-implement ABCMeta in C (#5273)Ivan Levkivskyi2018-02-181-5/+12
| | | | This adds C versions of methods used by ABCMeta that improve performance of various ABC operations.
* bpo-32226: PEP 560: improve typing module (#4906)Ivan Levkivskyi2018-01-201-5/+0
| | | | This PR re-designs the internal typing API using the new PEP 560 features. However, there are only few minor changes in the public API.
* bpo-31217: Fix regrtest -R for small integer (#3260)Victor Stinner2017-09-011-3/+11
| | | | | | | | Use a pool of integer objects toprevent false alarm when checking for memory block leaks. Fill the pool with values in -1000..1000 which are the most common (reference, memory block, file descriptor) differences. Co-Authored-By: Antoine Pitrou <pitrou@free.fr>
* bpo-26732: fix too many fds in processes started with the "forkserver" ↵Antoine Pitrou2017-07-221-31/+1
| | | | | | | | | | method (#2813) * bpo-26732: fix too many fds in processes started with the "forkserver" method A child process would inherit as many fds as the number of still-running children. * Add blurb and test comment
* bpo-30776: regrtest: reduce memleak false positive (#2484)Victor Stinner2017-06-291-10/+3
| | | Only report a leak if each run leaks at least one memory block.
* bpo-30776: reduce regrtest -R false positives (#2422)Victor Stinner2017-06-271-3/+22
| | | | | | | | | | | | | | * Change the regrtest --huntrleaks checker to decide if a test file leaks or not. Require that each run leaks at least 1 reference. * Warmup runs are now completely ignored: ignored in the checker test and not used anymore to compute the sum. * Add an unit test for a reference leak. Example of reference differences previously considered a failure (leak) and now considered as success (success, no leak): [3, 0, 0] [0, 1, 0] [8, -8, 1]
* bpo-29638: Fix spurious refleaks after typing is imported (#469)Ivan Levkivskyi2017-03-051-3/+8
|
* Fix regrtest -j0 -R outputVictor Stinner2017-02-081-1/+1
| | | | Write also dots into stderr, instead of stdout.
* Issue #23839: Various caches now are cleared before running every test file.Serhiy Storchaka2016-11-111-25/+84
|
* Issue #28649: Clear the typing module caches when search for reference leaks.Serhiy Storchaka2016-11-091-0/+8
|
* Issue #18174: "python -m test --huntrleaks ..." now also checks for leak ofVictor Stinner2015-10-031-5/+42
| | | | file descriptors. Patch written by Richard Oudkerk.
* Issue #25220: Fix "-m test --forever"Victor Stinner2015-09-301-2/+4
| | | | | | | * Fix "-m test --forever": replace _test_forever() with self._test_forever() * Add unit test for --forever * Add unit test for a failing test * Fix also some pyflakes warnings in libregrtest
* Issue #25220: Use print(flush=True) in libregrtestVictor Stinner2015-09-301-6/+4
|
* Issue #25220: Move most regrtest.py code to libregrtestVictor Stinner2015-09-261-0/+165