import mozunit import proctest from mozprocess import processhandler
here = os.path.dirname(os.path.abspath(__file__))
class ProcTestOutput(proctest.ProcTest): """Class to test operations related to output handling"""
def test_process_output_twice(self): """
Process is started, then processOutput is called a second time explicitly """
p = processhandler.ProcessHandler(
[self.python, self.proclaunch, "process_waittimeout_10s.ini"], cwd=here
)
p.run()
p.processOutput(timeout=5)
p.wait()
self.determine_status(p, False, ())
def test_process_output_nonewline(self): """
Process is started, outputs data with no newline """
p = processhandler.ProcessHandler(
[self.python, os.path.join("scripts", "procnonewline.py")], cwd=here
)
p.run()
p.processOutput(timeout=5)
p.wait()
self.determine_status(p, False, ())
def test_stream_process_output(self): """
Process output stream does not buffer """
expected = "\n".join([str(n) for n in range(0, 10)])
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.