MCPcopy Create free account
hub / github.com/apache/arrow / test_set_memory_pool

Function test_set_memory_pool

python/pyarrow/tests/test_memory.py:107–117  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

105
106
107def test_set_memory_pool():
108 old_pool = pa.default_memory_pool()
109 pool = pa.proxy_memory_pool(old_pool)
110 pa.set_memory_pool(pool)
111 try:
112 allocated_before = pool.bytes_allocated()
113 with allocate_bytes(None, 512):
114 assert pool.bytes_allocated() == allocated_before + 512
115 assert pool.bytes_allocated() == allocated_before
116 finally:
117 pa.set_memory_pool(old_pool)
118
119
120def test_default_backend_name():

Callers

nothing calls this directly

Calls 3

allocate_bytesFunction · 0.85
set_memory_poolMethod · 0.80
bytes_allocatedMethod · 0.45

Tested by

no test coverage detected