MCPcopy Create free account
hub / github.com/python/cpython / test_buffer_freeing

Method test_buffer_freeing

Lib/test/test_io/test_bufferedio.py:225–231  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

223
224 @support.cpython_only
225 def test_buffer_freeing(self) :
226 bufsize = 4096
227 rawio = self.MockRawIO()
228 bufio = self.tp(rawio, buffer_size=bufsize)
229 size = sys.getsizeof(bufio) - bufsize
230 bufio.close()
231 self.assertEqual(sys.getsizeof(bufio), size)
232
233class BufferedReaderTest(CommonBufferedTests):
234 read_mode = "rb"

Callers

nothing calls this directly

Calls 2

closeMethod · 0.45
assertEqualMethod · 0.45

Tested by

no test coverage detected