def test_get_current_threads(self): '''Test thread info is extracted.''' tinfos = process.get_current_threads() for tinfo in tinfos: self.assertEqual(type(tinfo.ident), int) self.assertEqual(type(tinfo.name), type('')) self.assertEqual(type(tinfo.daemon), type(True)) self.failIfEqual(tinfo.ident, 0)
def test_get_current_threads(self): """Test thread info is extracted.""" tinfos = process.get_current_threads() for tinfo in tinfos: self.assertEqual(type(tinfo.ident), int) self.assertEqual(type(tinfo.name), type("")) self.assertEqual(type(tinfo.daemon), type(True)) self.failIfEqual(tinfo.ident, 0)
def process(): """Get process overview.""" pmi = ProcessMemoryInfo() threads = get_current_threads() return dict(info=pmi, threads=threads)