Check invalid logs after exiting process.

This commit is contained in:
Florian Bruhin 2015-10-27 07:14:40 +01:00
parent 1c7fd7d80e
commit 4b683cdd8f
2 changed files with 3 additions and 5 deletions

View File

@ -183,5 +183,5 @@ def quteproc(qapp, httpbin):
proc = QuteProc(httpbin) proc = QuteProc(httpbin)
proc.start() proc.start()
yield proc yield proc
proc.after_test()
proc.terminate() proc.terminate()
proc.after_test()

View File

@ -134,15 +134,13 @@ class Process(QObject):
unexpected output lines earlier. unexpected output lines earlier.
""" """
self._data.clear() self._data.clear()
if not self.is_running():
print("Restarting process...")
self.start()
raise ProcessExited
if self._invalid: if self._invalid:
raise InvalidLine raise InvalidLine
def terminate(self): def terminate(self):
"""Clean up and shut down the process.""" """Clean up and shut down the process."""
if not self.is_running():
raise ProcessExited
self.proc.terminate() self.proc.terminate()
self.proc.waitForFinished() self.proc.waitForFinished()