Lines Matching refs:plist
291 def _BasicCheck(self, plist, oper): argument
293 self.assertEqual(plist[0], oper.stdout_data)
294 self.assertEqual(plist[1], oper.stderr_data)
295 self.assertEqual(plist[2], oper.combined_data)
298 self.assertEqual(len(plist[0]) + len(plist[1]), len(plist[2]))
303 plist = Popen(['ps']).CommunicateFilter(oper.Output)
304 self._BasicCheck(plist, oper)
310 plist = Popen([cmd], shell=True).CommunicateFilter(oper.Output)
311 self._BasicCheck(plist, oper)
312 self.assertEqual(plist [0], 'bad\r\n')
313 self.assertEqual(plist [1], 'fred\r\n')
320 plist = Popen([cmd], shell=True).CommunicateFilter(oper.Output)
321 self._BasicCheck(plist, oper)
322 self.assertEqual(len(plist [0]), 0)
323 self.assertEqual(plist [1], 'test\r\n')
329 plist = Popen(cmd, shell=False).CommunicateFilter(oper.Output)
330 self._BasicCheck(plist, oper)
331 self.assertEqual(plist [0], ' '.join(cmd[1:]) + '\r\n')
332 self.assertEqual(len(plist [1]), 0)
338 plist = Popen(cmd, shell=True).CommunicateFilter(oper.Output)
339 self._BasicCheck(plist, oper)
340 self.assertEqual(plist [0], '\r\n')
346 plist = Popen('pwd', shell=shell, cwd='/tmp').CommunicateFilter(oper.Output)
347 self._BasicCheck(plist, oper)
348 self.assertEqual(plist [0], '/tmp\r\n')
358 plist = Popen(cmd, shell=True, env=env).CommunicateFilter(oper.Output)
359 self._BasicCheck(plist, oper)
360 self.assertEqual(plist [0], add and 'fred\r\n' or '\r\n')
376 plist = Popen([cmd], stdin=oper.stdin_read_pipe,
378 self._BasicCheck(plist, oper)
379 self.assertEqual(len(plist [1]), 0)
380 self.assertEqual(plist [0], prompt + 'Hello Flash\r\r\n')
390 plist = Popen(both_cmds, shell=True).CommunicateFilter(oper.Output)
391 self._BasicCheck(plist, oper)
392 self.assertEqual(plist [0], 'terminal 1\r\n')
393 self.assertEqual(plist [1], 'terminal 2\r\n')
397 plist = Popen(both_cmds, stdout=subprocess.PIPE, stderr=subprocess.PIPE,
399 self._BasicCheck(plist, oper)
400 self.assertEqual(plist [0], 'not 1\n')
401 self.assertEqual(plist [1], 'not 2\n')