From bba6589e1928445b1c8c82692ff192c601e6deee Mon Sep 17 00:00:00 2001 From: Florian Bruhin Date: Wed, 16 Dec 2015 20:17:29 +0100 Subject: [PATCH] Capture qutebrowser/httpbin output separately. When using print and relying on pytest to capture it as stdout, we ran into this pytest/pytest-qt issue: https://github.com/pytest-dev/pytest-qt/issues/113 Now we use our own capturing mechanism instead, which also means we get nicer output. Fixes #1122. --- tests/integration/conftest.py | 1 + tests/integration/quteprocess.py | 7 ++++--- tests/integration/testprocess.py | 32 ++++++++++++++++++++++++++++++-- tests/integration/webserver.py | 5 +++-- 4 files changed, 38 insertions(+), 7 deletions(-) diff --git a/tests/integration/conftest.py b/tests/integration/conftest.py index 2cf649408..0f5cf081e 100644 --- a/tests/integration/conftest.py +++ b/tests/integration/conftest.py @@ -23,3 +23,4 @@ from webserver import httpbin, httpbin_after_test from quteprocess import quteproc_process, quteproc +from testprocess import pytest_runtest_makereport diff --git a/tests/integration/quteprocess.py b/tests/integration/quteprocess.py index 5838c3376..86c1e7f3c 100644 --- a/tests/integration/quteprocess.py +++ b/tests/integration/quteprocess.py @@ -174,7 +174,7 @@ class QuteProc(testprocess.Process): # pylint: disable=no-member if (log_line.loglevel in ['INFO', 'WARNING', 'ERROR'] or pytest.config.getoption('--verbose')): - print(line) + self._log(line) start_okay_message_load = ( "load status for