From 8b016df023f1a31c27c4ad7efae7e93cdcb2beb7 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Mon, 9 Nov 2015 07:41:57 +0100 Subject: [PATCH] bdd: Make InvalidLine show some more informations. --- tests/integration/testprocess.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/tests/integration/testprocess.py b/tests/integration/testprocess.py index 8f0ba1bb6..cf774456f 100644 --- a/tests/integration/testprocess.py +++ b/tests/integration/testprocess.py @@ -79,7 +79,7 @@ class Process(QObject): def __init__(self, parent=None): super().__init__(parent) - self._invalid = False + self._invalid = [] self._data = [] self.proc = QProcess() self.proc.setReadChannel(QProcess.StandardError) @@ -131,7 +131,7 @@ class Process(QObject): try: parsed = self._parse_line(line) except InvalidLine: - self._invalid = True + self._invalid.append(line) print("INVALID: {}".format(line)) continue @@ -161,7 +161,7 @@ class Process(QObject): """ self._data.clear() if self._invalid: - raise InvalidLine + raise InvalidLine(self._invalid) if not self.is_running(): raise ProcessExited