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

Function test_set_memory_pool

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

Source from the content-addressed store, hash-verified

104
105
106def test_set_memory_pool():
107 old_pool = pa.default_memory_pool()
108 pool = pa.proxy_memory_pool(old_pool)
109 pa.set_memory_pool(pool)
110 try:
111 allocated_before = pool.bytes_allocated()
112 with allocate_bytes(None, 512):
113 assert pool.bytes_allocated() == allocated_before + 512
114 assert pool.bytes_allocated() == allocated_before
115 finally:
116 pa.set_memory_pool(old_pool)
117
118
119def 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