1 This directory contains test cases that are known to leak references.
2 The idea is that you can import these modules while in the interpreter
3 and call the leak function repeatedly. This will only be helpful if
4 the interpreter was built in debug mode. If the total ref count
5 doesn't increase, the bug has been fixed and the file should be removed
8 Note: be careful to check for cyclic garbage. Sometimes it may be helpful
9 to define the leak function like:
13 # this is the function that leaks, but also creates cycles
15 gc.collect() ; gc.collect() ; gc.collect()
17 Here's an example interpreter session for test_gestalt which still leaks:
19 >>> from test.leakers.test_gestalt import leak
29 Once the leak is fixed, the test case should be moved into an appropriate
30 test (even if it was originally from the test suite). This ensures the
31 regression doesn't happen again. And if it does, it should be easier