def test_pid(self):
a = sb.launch('comp_src')
#status,output = commands.getstatusoutput('ps -ef | grep comp_src | grep -v grep ')
status,output = commands.getstatusoutput('ps -ww -f | grep comp_src ')
lines = output.split('\n')
for line in lines:
if 'IOR' in line:
break
_pid = line.split()[1]
self.assertEquals(int(_pid), a._pid)
评论列表
文章目录