diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-03-05 22:31:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-03-05 22:31:54 (GMT) |
commit | a9df651eb4c18a07ec309df190419613e95cba7b (patch) | |
tree | 8c014426433938a9c94e7555b20eb13d78369cfa /Lib | |
parent | d8b3a98c9098c66a714fd5593e1928af0ffbc631 (diff) | |
download | cpython-a9df651eb4c18a07ec309df190419613e95cba7b.zip cpython-a9df651eb4c18a07ec309df190419613e95cba7b.tar.gz cpython-a9df651eb4c18a07ec309df190419613e95cba7b.tar.bz2 |
bpo-36142: Add _PyMem_GetDebugAllocatorsName() (GH-12185)
The development mode now uses the effective name of the debug memory
allocator ("pymalloc_debug" or "malloc_debug"). So the name doesn't
change after setting the memory allocator.
Diffstat (limited to 'Lib')
-rw-r--r-- | Lib/test/test_embed.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/Lib/test/test_embed.py b/Lib/test/test_embed.py index 1f236a9..2827e87 100644 --- a/Lib/test/test_embed.py +++ b/Lib/test/test_embed.py @@ -336,6 +336,7 @@ 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 = ( @@ -588,7 +589,7 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase): def test_init_env_dev_mode(self): config = dict(self.INIT_ENV_CONFIG, - allocator='debug', + allocator=self.DEBUG_ALLOCATOR, dev_mode=1) self.check_config("init_env_dev_mode", config) @@ -596,7 +597,7 @@ class InitConfigTests(EmbeddingTestsMixin, unittest.TestCase): config = { 'dev_mode': 1, 'faulthandler': 1, - 'allocator': 'debug', + 'allocator': self.DEBUG_ALLOCATOR, } self.check_config("init_dev_mode", config) |