From 5eafccb6041c70b5a4d8fcca411a844672f56777 Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Thu, 7 Jan 2016 21:15:24 +0100 Subject: [PATCH] tests: Print logs live when -s is given. --- tests/integration/testprocess.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/integration/testprocess.py b/tests/integration/testprocess.py index ff33eea84..b64d14049 100644 --- a/tests/integration/testprocess.py +++ b/tests/integration/testprocess.py @@ -103,6 +103,10 @@ def pytest_runtest_makereport(item, call): # actually a tuple. This is handled similarily in pytest-qt too. return + if pytest.config.getoption('--capture') == 'no': + # Already printed live + return + if quteproc_log is not None: report.longrepr.addsection("qutebrowser output", _render_log(quteproc_log)) @@ -140,6 +144,8 @@ class Process(QObject): def _log(self, line): """Add the given line to the captured log output.""" + if pytest.config.getoption('--capture') == 'no': + print(line) self.captured_log.append(line) def _parse_line(self, line):