def test_processStat_exception(self, mock_open): mock_open.side_effect = OSError() pid = self.createProcess() self.assertEqual(tools.processStat(pid), '')
def test_processStat(self): pid = self.createProcess() stat = tools.processStat(pid) self.assertRegex(stat, r'{} \({}\) \w .*'.format(pid, generic.DUMMY[:15]))