[Python-Dev] cpython (merge 3.2 -> default): MERGE: Better test for Issue #15402: Add a __sizeof__ method to struct.Struct

Serhiy Storchaka storchaka at gmail.com
Mon Jul 23 22:31:14 CEST 2012

On 23.07.12 22:46, Michael Foord wrote:
>> I am now prepared a set of 14 __sizeof__ patches (should it be one issue or 14 individual issues in bugtracker?), and I feel a great desire not to write tests at all.
> Without tests how can you have any confidence the patches are correct (or will continue to be correct)?

Tests may not provide this. If we add a new dynamically allocated data 
or change the size of the old and forgot to reflect this in __sizeof__, 
then non modified tests not notice this. __sizeof__ returns 42. What is 42?

More information about the Python-Dev mailing list