]> git.ipfire.org Git - thirdparty/Python/cpython.git/commit
bpo-36611: Fix test_sys.test_getallocatedblocks() (GH-12797)
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Fri, 12 Apr 2019 13:33:31 +0000 (06:33 -0700)
committerGitHub <noreply@github.com>
Fri, 12 Apr 2019 13:33:31 +0000 (06:33 -0700)
commit7182e653fb5c6f78f05892b6ed302fc8db8978d3
tree8e7fe83777fac38ab04e05401a88214e2698e7bb
parenta910c2c6f3542b61f084de2ece0d8dab09c5a0fa
bpo-36611: Fix test_sys.test_getallocatedblocks() (GH-12797)

Fix test_sys.test_getallocatedblocks() when tracemalloc is enabled.
If the name of Python memory allocators cannot get read, consider
that pymalloc is disabled.

Fix the following error:

./python -X tracemalloc -m test test_sys -v -m test_getallocatedblocks

ERROR: test_getallocatedblocks (test.test_sys.SysModuleTest)
------------------------------------------------------------
Traceback (most recent call last):
  File "Lib/test/test_sys.py", line 770, in test_getallocatedblocks
    alloc_name = _testcapi.pymem_getallocatorsname()
RuntimeError: cannot get allocators name
(cherry picked from commit 9b8314cfe29ca532fc335277f6c36b72e6132922)

Co-authored-by: Victor Stinner <vstinner@redhat.com>
Lib/test/test_sys.py
Misc/NEWS.d/next/Tests/2019-04-12-12-44-42.bpo-36611.UtorXL.rst [new file with mode: 0644]