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:243–257  ·  view source on GitHub ↗
(pool_factory, env_value, msg)

Source from the content-addressed store, hash-verified

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