[issue15488] Closed files keep their buffer alive
Meador Inge
report at bugs.python.org
Wed Aug 1 06:11:53 CEST 2012
Meador Inge added the comment:
The test should go in the 'SizeofTest' class and maybe a better test would be a variant of the test already in that class:
@support.cpython_only
def test_buffer_freeing(self) :
bufsize = 4096
rawio = self.MockRawIO()
bufio = self.tp(rawio, buffer_size=bufsize)
size = sys.getsizeof(bufio) - bufsize
bufio.close()
self.assertEqual(sys.getsizeof(bufio), size)
Otherwise, LGTM.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue15488>
_______________________________________
More information about the Python-bugs-list
mailing list