bpo-36142: PYTHONMALLOC overrides PYTHONDEV by vstinner · Pull Request #12191 · python/cpython

@vstinner

bpo-34247, bpo-36142: The PYTHONMALLOC environment variable has the
priority over PYTHONDEV env var and "-X dev" command line option.
For example, PYTHONMALLOC=malloc PYTHONDEVMODE=1 sets the memory
allocators to "malloc" (and not to "debug").

Add an unit test.