From 09edbd9492e59c0c8dcae69b4b1f4b745867abe4 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sat, 11 Jun 2016 19:52:24 +1200 Subject: Improve debugging of thread and other leaks - Add basethread.BaseThread that all threads outside of test suites should use - Add a signal handler to mitmproxy, mitmdump and mitmweb that dumps resource information to screen when SIGUSR1 is received. - Improve thread naming throughout to make thread dumps understandable --- test/netlib/test_debug.py | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'test/netlib') diff --git a/test/netlib/test_debug.py b/test/netlib/test_debug.py index d174bb5f..c39d3752 100644 --- a/test/netlib/test_debug.py +++ b/test/netlib/test_debug.py @@ -1,6 +1,14 @@ +from __future__ import (absolute_import, print_function, division) +from six.moves import cStringIO as StringIO from netlib import debug +def test_dump_info(): + cs = StringIO() + debug.dump_info(None, None, file=cs) + assert cs.getvalue() + + def test_sysinfo(): assert debug.sysinfo() -- cgit v1.2.3