(pool_factory, env_value, msg)
| 241 | |
| 242 | |
| 243 | def 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()) |
no test coverage detected