def test_waitnotimeout(self): """Process is started, runs to completion before our wait times out"""
p = mozprocess.run_and_wait(
[self.python, self.proclaunch, "process_waittimeout_10s.ini"],
cwd=here,
timeout=30,
)
self.assertEqual(p.returncode, 0)
def test_outputtimeout(self): """Process produces output, but output stalls and exceeds output timeout"""
pgm = """ import time
for i in range(10):
print(i)
time.sleep(1)
time.sleep(10)
print("survived sleep!") """
found = False
found9 = False
timed_out = False
def olh(p, line): nonlocal found nonlocal found9 if"9"in line:
found9 = True if"survived"in line:
found = True
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.