diff options
author | Victor Stinner <vstinner@redhat.com> | 2019-04-12 13:15:04 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-04-12 13:15:04 (GMT) |
commit | 9b8314cfe29ca532fc335277f6c36b72e6132922 (patch) | |
tree | a16a8655672669faa2858edac59f719bbf53c3b3 /Misc | |
parent | 9e4f2f3a6b8ee995c365e86d976937c141d867f8 (diff) | |
download | cpython-9b8314cfe29ca532fc335277f6c36b72e6132922.zip cpython-9b8314cfe29ca532fc335277f6c36b72e6132922.tar.gz cpython-9b8314cfe29ca532fc335277f6c36b72e6132922.tar.bz2 |
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
Diffstat (limited to 'Misc')
-rw-r--r-- | Misc/NEWS.d/next/Tests/2019-04-12-12-44-42.bpo-36611.UtorXL.rst | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/Tests/2019-04-12-12-44-42.bpo-36611.UtorXL.rst b/Misc/NEWS.d/next/Tests/2019-04-12-12-44-42.bpo-36611.UtorXL.rst new file mode 100644 index 0000000..e4da7f1 --- /dev/null +++ b/Misc/NEWS.d/next/Tests/2019-04-12-12-44-42.bpo-36611.UtorXL.rst @@ -0,0 +1,2 @@ +Fix ``test_sys.test_getallocatedblocks()`` when :mod:`tracemalloc` is +enabled. |