summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
authorVictor Stinner <vstinner@redhat.com>2019-03-06 00:13:43 (GMT)
committerGitHub <noreply@github.com>2019-03-06 00:13:43 (GMT)
commitc656e25667c9acc0d13e5bb16d3df2938d0f614b (patch)
tree61e424b53e6f0b1f5a2d7637fedf47ab5e91962e /Lib/test
parent7d2ef3ef5042356aaeaf832ad4204b7dad2e1b8c (diff)
downloadcpython-c656e25667c9acc0d13e5bb16d3df2938d0f614b.zip
cpython-c656e25667c9acc0d13e5bb16d3df2938d0f614b.tar.gz
cpython-c656e25667c9acc0d13e5bb16d3df2938d0f614b.tar.bz2
bpo-36142: Add _PyPreConfig_SetAllocator() (GH-12187)
* _PyPreConfig_Write() now reallocates the pre-configuration with the new memory allocator. * It is no longer needed to force the "default raw memory allocator" to clear pre-configuration and core configuration. Simplify the code. * _PyPreConfig_Write() now does nothing if called after Py_Initialize(): no longer check if the allocator is the same. * Remove _PyMem_GetDebugAllocatorsName(): dev mode sets again allocator to "debug".
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/test_embed.py5
1 files changed, 2 insertions, 3 deletions
diff --git a/Lib/test/test_embed.py b/Lib/test/test_embed.py
index 2827e87..1f236a9 100644
--- a/Lib/test/test_embed.py
+++ b/Lib/test/test_embed.py
@@ -336,7 +336,6 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
'legacy_windows_fs_encoding': 0,
'legacy_windows_stdio': 0,
})
- DEBUG_ALLOCATOR = 'pymalloc_debug' if support.with_pymalloc() else 'malloc_debug'
# main config
COPY_MAIN_CONFIG = (
@@ -589,7 +588,7 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
def test_init_env_dev_mode(self):
config = dict(self.INIT_ENV_CONFIG,
- allocator=self.DEBUG_ALLOCATOR,
+ allocator='debug',
dev_mode=1)
self.check_config("init_env_dev_mode", config)
@@ -597,7 +596,7 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase):
config = {
'dev_mode': 1,
'faulthandler': 1,
- 'allocator': self.DEBUG_ALLOCATOR,
+ 'allocator': 'debug',
}
self.check_config("init_dev_mode", config)