summaryrefslogtreecommitdiff
path: root/Lib/test/test_sys.py
diff options
context:
space:
mode:
authorDavid Malcolm <dmalcolm@redhat.com>2012-06-22 14:55:41 -0400
committerDavid Malcolm <dmalcolm@redhat.com>2012-06-22 14:55:41 -0400
commit49526f48fc73d3ccdf09d466ed2d39a30e4df9b9 (patch)
tree51ac80c4d09ca4a537518555710423675a6ac731 /Lib/test/test_sys.py
parent69cf913ba110de2eb773c030b1dd606456ac5831 (diff)
downloadcpython-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.py6
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):