Description
Feature or enhancement
Proposal:
There are a number of tests that check various aspects of memory management, typically related to some specific module or feature. Nearly every one of these tests is fairly tightly coupled to the fine details of our memory management implementation, usually tied to specific numbers.
This makes the tests fragile, often breaking with even slight changes to some aspect of memory management. 1
For example, in #121134 (comment), @Fidget-Spinner says:
It fails
test.test_gdb.test_pretty_print test_capi test_exceptions test_regrtest test_repl test_sys test_tracemalloc
mainly because they count allocations/test out of memory situations, and the hashtable adds random allocations which breaks their careful calculations.
Ideally, we would find a way to make such tests less coupled to specific numbers, without sacrificing the accuracy of the behavior checks they are making.
Has this already been discussed elsewhere?
This is a minor feature, which does not need previous discussion elsewhere
Links to previous discussion of this feature:
No response