Package qpid :: Module brokertest :: Class Popen
[frames] | no frames]

Class Popen

popen2.Popen3 --+
                |
               Popen

Similar to subprocess.Popen but using popen2 classes for portability. Can set and verify expectation of process status at end of test. Dumps command line, stdout, stderr to data dir for debugging.

Nested Classes
  DrainThread
Thread to drain a file object and write the data to a file.
  OutStream
Wrapper for output streams, handles exceptions & draining output
Instance Methods
 
outfile(self, ext)
 
__init__(self, cmd, expect=EXPECT_EXIT_OK, drain=True)
Run cmd (should be a list of arguments) expect - if set verify expectation at end of test.
 
drain(self)
Start threads to drain stdout/err
 
unexpected(self, msg)
 
stop(self)
 
communicate(self, input=None)
 
is_running(self)
 
assert_running(self)
 
poll(self)
 
wait(self)
 
send_signal(self, sig)
 
terminate(self)
 
kill(self)
 
cmd_str(self)
Method Details

__init__(self, cmd, expect=EXPECT_EXIT_OK, drain=True)
(Constructor)

 

Run cmd (should be a list of arguments) expect - if set verify expectation at end of test. drain - if true (default) drain stdout/stderr to files.