From c052c8a107e501c003c1a0f4ab8605932a8db139 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Tue, 13 Oct 2015 06:40:12 +0200 Subject: [PATCH] Don't show full debug log without --verbose. --- tests/integration/quteprocess.py | 4 ++++ tests/integration/testprocess.py | 1 - tests/integration/webserver.py | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/integration/quteprocess.py b/tests/integration/quteprocess.py index c00815fba..5ce9ceaff 100644 --- a/tests/integration/quteprocess.py +++ b/tests/integration/quteprocess.py @@ -78,6 +78,10 @@ class QuteProc(testprocess.Process): raise testprocess.InvalidLine log_line = LogLine(**match.groupdict()) + if (log_line.loglevel in ['INFO', 'WARNING', 'ERROR'] or + pytest.config.getoption('--verbose')): + print(line) + start_okay_message = ("load status for " ": LoadStatus.success") diff --git a/tests/integration/testprocess.py b/tests/integration/testprocess.py index 799682543..35af25912 100644 --- a/tests/integration/testprocess.py +++ b/tests/integration/testprocess.py @@ -98,7 +98,6 @@ class Process(QObject): while self.proc.canReadLine(): line = self.proc.readLine() line = bytes(line).decode('utf-8').rstrip('\r\n') - print(line) try: parsed = self._parse_line(line) diff --git a/tests/integration/webserver.py b/tests/integration/webserver.py index b9fc1c9be..e8ac2b7ea 100644 --- a/tests/integration/webserver.py +++ b/tests/integration/webserver.py @@ -84,6 +84,7 @@ class HTTPBin(testprocess.Process): return self._get_data() def _parse_line(self, line): + print(line) if line == (' * Running on http://127.0.0.1:{}/ (Press CTRL+C to ' 'quit)'.format(self.port)): self.ready.emit()