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

Function check_debug_memory_pool_disabled

python/pyarrow/tests/test_memory.py:242–256  ·  view source on GitHub ↗
(pool_factory, env_value, msg)

Source from the content-addressed store, hash-verified

240
241
242def check_debug_memory_pool_disabled(pool_factory, env_value, msg):
243 if sys.maxsize < 2**32:
244 # GH-45011: mimalloc may print warnings in this test on 32-bit Linux, ignore.
245 pytest.skip("Test may fail on 32-bit platforms")
246 res = run_debug_memory_pool(pool_factory.__name__, env_value)
247 # The subprocess either returned successfully or was killed by a signal
248 # (due to writing out of bounds), depending on the underlying allocator.
249 if os.name == "posix":
250 assert res.returncode <= 0
251 else:
252 res.check_returncode()
253 if msg == "":
254 assert res.stderr == ""
255 else:
256 assert msg in res.stderr
257
258
259@pytest.mark.parametrize('pool_factory', supported_factories())

Callers 3

Calls 2

run_debug_memory_poolFunction · 0.85
check_returncodeMethod · 0.80

Tested by

no test coverage detected