diff options
author | David Malcolm <dmalcolm@redhat.com> | 2012-06-22 14:55:41 -0400 |
---|---|---|
committer | David Malcolm <dmalcolm@redhat.com> | 2012-06-22 14:55:41 -0400 |
commit | 49526f48fc73d3ccdf09d466ed2d39a30e4df9b9 (patch) | |
tree | 51ac80c4d09ca4a537518555710423675a6ac731 /Lib/test/test_sys.py | |
parent | 69cf913ba110de2eb773c030b1dd606456ac5831 (diff) | |
download | cpython-git-49526f48fc73d3ccdf09d466ed2d39a30e4df9b9.tar.gz |
Issue #14785: Add sys._debugmallocstats() to help debug low-level memory allocation issues
Diffstat (limited to 'Lib/test/test_sys.py')
-rw-r--r-- | Lib/test/test_sys.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Lib/test/test_sys.py b/Lib/test/test_sys.py index 796a1c5db3..9a6dd5ba69 100644 --- a/Lib/test/test_sys.py +++ b/Lib/test/test_sys.py @@ -603,6 +603,12 @@ class SysModuleTest(unittest.TestCase): self.assertEqual(sys.implementation.name, sys.implementation.name.lower()) + def test_debugmallocstats(self): + # Test sys._debugmallocstats() + from test.script_helper import assert_python_ok + args = ['-c', 'import sys; sys._debugmallocstats()'] + ret, out, err = assert_python_ok(*args) + self.assertIn(b"free PyDictObjects", err) class SizeofTest(unittest.TestCase): |