Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Disable qtlog #58

Merged
merged 5 commits into from
Jun 29, 2015
Merged

Disable qtlog #58

merged 5 commits into from
Jun 29, 2015

Conversation

nicoddemus
Copy link
Member

@The-Compiler, can you do a quick review? Perhaps even test it with your code base to ensure everything is like you wanted. 😄

@@ -43,6 +43,8 @@ For example:
1 failed in 0.01 seconds


**Disabling Loggin Capture**
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Logging 😉

@The-Compiler
Copy link
Member

The diff looks good apart from the few inline comments.

I'll test this with qutebrowser later.

qInstallMsgHandler(self._previous_handler)

@contextmanager
def disabled(self):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps call this disable instead of disabled? Doing qtlog.disable() seems more natural, disabled sounds more like an attribute to check whether something is currently disabled.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm perhaps... I named it from "disabled within the context".

Either way, I think it is too late to rename it now without breaking semantic versioning... 😶

@The-Compiler
Copy link
Member

I now tried it and got this:

Traceback (most recent call last):
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/pytestqt/qt_compat.py", line 104, in _Qt5MessageHandler
    handler(msg_type, msg)
TypeError: _Qt5MessageHandler() missing 1 required positional argument: 'msg'

full output with some pytest-capturelog and PyQt warnings as well (no idea what's going on):

______________________________________ TestHideQtWarning.test_unfiltered _______________________________________

self = <test_log.TestHideQtWarning object at 0x7fd584ebbbe0>
caplog = <pytest_capturelog.CaptureLogFuncArg object at 0x7fd531051588>
qtlog = <pytestqt.plugin._QtMessageCapture object at 0x7fd584ebb550>

    def test_unfiltered(self, caplog, qtlog):
        """Test a message which is not filtered."""
        with qtlog.disabled():
            with log.hide_qt_warning("World", logger='qt-tests'):
                with caplog.atLevel(logging.WARNING, logger='qt-tests'):
                    qWarning("Hello World")
        assert len(caplog.records()) == 1
        record = caplog.records()[0]
        assert record.levelname == 'WARNING'
>       assert record.message == "Hello World"
E       assert '/home/floria...llo World")\n' == 'Hello World'
E         + Hello World
E         - /home/florian/proj/qutebrowser/git/tests/utils/test_log.py:238: DeprecationWarning: unhandled Python exceptions will call qFatal() in PyQt v5.5
E         -   qWarning("Hello World")

tests/utils/test_log.py:242: AssertionError
------------------------------------------------- Captured log -------------------------------------------------
test_log.py                238 WARNING  /home/florian/proj/qutebrowser/git/tests/utils/test_log.py:238: DeprecationWarning: unhandled Python exceptions will call qFatal() in PyQt v5.5
  qWarning("Hello World")
--------------------------------------------- Captured stderr call ---------------------------------------------
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib64/python3.4/logging/__init__.py", line 980, in emit
    stream.write(msg)
ValueError: I/O operation on closed file
Call stack:
  File "/usr/lib64/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/py/test.py", line 4, in <module>
    sys.exit(pytest.main())
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/config.py", line 41, in main
    return config.hook.pytest_cmdline_main(config=config)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 116, in pytest_cmdline_main
    return wrap_session(config, _main)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 84, in wrap_session
    doit(config, session)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 122, in _main
    config.hook.pytest_runtestloop(session=session)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 142, in pytest_runtestloop
    item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 393, in execute
    return wrapped_call(method(*args), self.execute)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 107, in wrapped_call
    call_outcome = CallOutcome(func)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 123, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 65, in pytest_runtest_protocol
    runtestprotocol(item, nextitem=nextitem)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 75, in runtestprotocol
    reports.append(call_and_report(item, "call", log))
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 119, in call_and_report
    call = call_runtest_hook(item, when, **kwds)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 137, in call_runtest_hook
    return CallInfo(lambda: ihook(item=item, **kwds), when=when)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 149, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 137, in <lambda>
    return CallInfo(lambda: ihook(item=item, **kwds), when=when)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 393, in execute
    return wrapped_call(method(*args), self.execute)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 107, in wrapped_call
    call_outcome = CallOutcome(func)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 123, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 90, in pytest_runtest_call
    item.runtest()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/python.py", line 1174, in runtest
    self.ihook.pytest_pyfunc_call(pyfuncitem=self)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/python.py", line 204, in pytest_pyfunc_call
    testfunction(**testargs)
  File "/home/florian/proj/qutebrowser/git/tests/utils/test_log.py", line 238, in test_unfiltered
    qWarning("Hello World")
  File "/usr/lib64/python3.4/logging/__init__.py", line 1937, in _showwarning
    logger.warning("%s", s)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1286, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1409, in _log
    self.handle(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1419, in handle
    self.callHandlers(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1481, in callHandlers
    hdlr.handle(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 853, in handle
    self.emit(record)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/pytest_capturelog.py", line 222, in emit
    logging.StreamHandler.emit(self, record)
Message: '%s'
Arguments: ('/home/florian/proj/qutebrowser/git/tests/utils/test_log.py:238: DeprecationWarning: unhandled Python exceptions will call qFatal() in PyQt v5.5\n  qWarning("Hello World")\n',)
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib64/python3.4/logging/__init__.py", line 980, in emit
    stream.write(msg)
ValueError: I/O operation on closed file
Call stack:
  File "/usr/lib64/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/py/test.py", line 4, in <module>
    sys.exit(pytest.main())
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/config.py", line 41, in main
    return config.hook.pytest_cmdline_main(config=config)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 116, in pytest_cmdline_main
    return wrap_session(config, _main)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 84, in wrap_session
    doit(config, session)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 122, in _main
    config.hook.pytest_runtestloop(session=session)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 142, in pytest_runtestloop
    item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 393, in execute
    return wrapped_call(method(*args), self.execute)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 107, in wrapped_call
    call_outcome = CallOutcome(func)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 123, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 65, in pytest_runtest_protocol
    runtestprotocol(item, nextitem=nextitem)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 75, in runtestprotocol
    reports.append(call_and_report(item, "call", log))
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 119, in call_and_report
    call = call_runtest_hook(item, when, **kwds)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 137, in call_runtest_hook
    return CallInfo(lambda: ihook(item=item, **kwds), when=when)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 149, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 137, in <lambda>
    return CallInfo(lambda: ihook(item=item, **kwds), when=when)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 393, in execute
    return wrapped_call(method(*args), self.execute)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 107, in wrapped_call
    call_outcome = CallOutcome(func)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 123, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 90, in pytest_runtest_call
    item.runtest()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/python.py", line 1174, in runtest
    self.ihook.pytest_pyfunc_call(pyfuncitem=self)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/python.py", line 204, in pytest_pyfunc_call
    testfunction(**testargs)
  File "/home/florian/proj/qutebrowser/git/tests/utils/test_log.py", line 238, in test_unfiltered
    qWarning("Hello World")
  File "/usr/lib64/python3.4/logging/__init__.py", line 1937, in _showwarning
    logger.warning("%s", s)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1286, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1409, in _log
    self.handle(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1419, in handle
    self.callHandlers(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1481, in callHandlers
    hdlr.handle(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 853, in handle
    self.emit(record)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/pytest_capturelog.py", line 222, in emit
    logging.StreamHandler.emit(self, record)
Message: '%s'
Arguments: ('/home/florian/proj/qutebrowser/git/tests/utils/test_log.py:238: DeprecationWarning: unhandled Python exceptions will call qFatal() in PyQt v5.5\n  qWarning("Hello World")\n',)
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib64/python3.4/logging/__init__.py", line 980, in emit
    stream.write(msg)
ValueError: I/O operation on closed file
Call stack:
  File "/usr/lib64/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/py/test.py", line 4, in <module>
    sys.exit(pytest.main())
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/config.py", line 41, in main
    return config.hook.pytest_cmdline_main(config=config)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 116, in pytest_cmdline_main
    return wrap_session(config, _main)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 84, in wrap_session
    doit(config, session)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 122, in _main
    config.hook.pytest_runtestloop(session=session)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 142, in pytest_runtestloop
    item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 393, in execute
    return wrapped_call(method(*args), self.execute)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 107, in wrapped_call
    call_outcome = CallOutcome(func)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 123, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 65, in pytest_runtest_protocol
    runtestprotocol(item, nextitem=nextitem)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 75, in runtestprotocol
    reports.append(call_and_report(item, "call", log))
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 119, in call_and_report
    call = call_runtest_hook(item, when, **kwds)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 137, in call_runtest_hook
    return CallInfo(lambda: ihook(item=item, **kwds), when=when)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 149, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 137, in <lambda>
    return CallInfo(lambda: ihook(item=item, **kwds), when=when)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 393, in execute
    return wrapped_call(method(*args), self.execute)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 107, in wrapped_call
    call_outcome = CallOutcome(func)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 123, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 90, in pytest_runtest_call
    item.runtest()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/python.py", line 1174, in runtest
    self.ihook.pytest_pyfunc_call(pyfuncitem=self)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/python.py", line 204, in pytest_pyfunc_call
    testfunction(**testargs)
  File "/home/florian/proj/qutebrowser/git/tests/utils/test_log.py", line 238, in test_unfiltered
    qWarning("Hello World")
  File "/usr/lib64/python3.4/logging/__init__.py", line 1937, in _showwarning
    logger.warning("%s", s)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1286, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1409, in _log
    self.handle(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1419, in handle
    self.callHandlers(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1481, in callHandlers
    hdlr.handle(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 853, in handle
    self.emit(record)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/pytest_capturelog.py", line 222, in emit
    logging.StreamHandler.emit(self, record)
Message: '%s'
Arguments: ('/home/florian/proj/qutebrowser/git/tests/utils/test_log.py:238: DeprecationWarning: unhandled Python exceptions will call qFatal() in PyQt v5.5\n  qWarning("Hello World")\n',)
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib64/python3.4/logging/__init__.py", line 980, in emit
    stream.write(msg)
ValueError: I/O operation on closed file
Call stack:
  File "/usr/lib64/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/py/test.py", line 4, in <module>
    sys.exit(pytest.main())
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/config.py", line 41, in main
    return config.hook.pytest_cmdline_main(config=config)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 116, in pytest_cmdline_main
    return wrap_session(config, _main)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 84, in wrap_session
    doit(config, session)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 122, in _main
    config.hook.pytest_runtestloop(session=session)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 142, in pytest_runtestloop
    item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 393, in execute
    return wrapped_call(method(*args), self.execute)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 107, in wrapped_call
    call_outcome = CallOutcome(func)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 123, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 65, in pytest_runtest_protocol
    runtestprotocol(item, nextitem=nextitem)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 75, in runtestprotocol
    reports.append(call_and_report(item, "call", log))
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 119, in call_and_report
    call = call_runtest_hook(item, when, **kwds)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 137, in call_runtest_hook
    return CallInfo(lambda: ihook(item=item, **kwds), when=when)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 149, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 137, in <lambda>
    return CallInfo(lambda: ihook(item=item, **kwds), when=when)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 393, in execute
    return wrapped_call(method(*args), self.execute)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 107, in wrapped_call
    call_outcome = CallOutcome(func)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 123, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 90, in pytest_runtest_call
    item.runtest()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/python.py", line 1174, in runtest
    self.ihook.pytest_pyfunc_call(pyfuncitem=self)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/python.py", line 204, in pytest_pyfunc_call
    testfunction(**testargs)
  File "/home/florian/proj/qutebrowser/git/tests/utils/test_log.py", line 238, in test_unfiltered
    qWarning("Hello World")
  File "/usr/lib64/python3.4/logging/__init__.py", line 1937, in _showwarning
    logger.warning("%s", s)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1286, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1409, in _log
    self.handle(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1419, in handle
    self.callHandlers(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1481, in callHandlers
    hdlr.handle(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 853, in handle
    self.emit(record)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/pytest_capturelog.py", line 222, in emit
    logging.StreamHandler.emit(self, record)
Message: '%s'
Arguments: ('/home/florian/proj/qutebrowser/git/tests/utils/test_log.py:238: DeprecationWarning: unhandled Python exceptions will call qFatal() in PyQt v5.5\n  qWarning("Hello World")\n',)
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib64/python3.4/logging/__init__.py", line 980, in emit
    stream.write(msg)
ValueError: I/O operation on closed file
Call stack:
  File "/usr/lib64/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/py/test.py", line 4, in <module>
    sys.exit(pytest.main())
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/config.py", line 41, in main
    return config.hook.pytest_cmdline_main(config=config)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 116, in pytest_cmdline_main
    return wrap_session(config, _main)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 84, in wrap_session
    doit(config, session)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 122, in _main
    config.hook.pytest_runtestloop(session=session)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 142, in pytest_runtestloop
    item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 393, in execute
    return wrapped_call(method(*args), self.execute)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 107, in wrapped_call
    call_outcome = CallOutcome(func)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 123, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 65, in pytest_runtest_protocol
    runtestprotocol(item, nextitem=nextitem)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 75, in runtestprotocol
    reports.append(call_and_report(item, "call", log))
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 119, in call_and_report
    call = call_runtest_hook(item, when, **kwds)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 137, in call_runtest_hook
    return CallInfo(lambda: ihook(item=item, **kwds), when=when)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 149, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 137, in <lambda>
    return CallInfo(lambda: ihook(item=item, **kwds), when=when)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 393, in execute
    return wrapped_call(method(*args), self.execute)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 107, in wrapped_call
    call_outcome = CallOutcome(func)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 123, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 90, in pytest_runtest_call
    item.runtest()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/python.py", line 1174, in runtest
    self.ihook.pytest_pyfunc_call(pyfuncitem=self)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/python.py", line 204, in pytest_pyfunc_call
    testfunction(**testargs)
  File "/home/florian/proj/qutebrowser/git/tests/utils/test_log.py", line 238, in test_unfiltered
    qWarning("Hello World")
  File "/usr/lib64/python3.4/logging/__init__.py", line 1937, in _showwarning
    logger.warning("%s", s)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1286, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1409, in _log
    self.handle(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1419, in handle
    self.callHandlers(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1481, in callHandlers
    hdlr.handle(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 853, in handle
    self.emit(record)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/pytest_capturelog.py", line 222, in emit
    logging.StreamHandler.emit(self, record)
Message: '%s'
Arguments: ('/home/florian/proj/qutebrowser/git/tests/utils/test_log.py:238: DeprecationWarning: unhandled Python exceptions will call qFatal() in PyQt v5.5\n  qWarning("Hello World")\n',)
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib64/python3.4/logging/__init__.py", line 980, in emit
    stream.write(msg)
ValueError: I/O operation on closed file
Call stack:
  File "/usr/lib64/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/py/test.py", line 4, in <module>
    sys.exit(pytest.main())
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/config.py", line 41, in main
    return config.hook.pytest_cmdline_main(config=config)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 116, in pytest_cmdline_main
    return wrap_session(config, _main)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 84, in wrap_session
    doit(config, session)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 122, in _main
    config.hook.pytest_runtestloop(session=session)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 142, in pytest_runtestloop
    item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 393, in execute
    return wrapped_call(method(*args), self.execute)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 107, in wrapped_call
    call_outcome = CallOutcome(func)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 123, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 65, in pytest_runtest_protocol
    runtestprotocol(item, nextitem=nextitem)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 75, in runtestprotocol
    reports.append(call_and_report(item, "call", log))
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 119, in call_and_report
    call = call_runtest_hook(item, when, **kwds)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 137, in call_runtest_hook
    return CallInfo(lambda: ihook(item=item, **kwds), when=when)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 149, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 137, in <lambda>
    return CallInfo(lambda: ihook(item=item, **kwds), when=when)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 393, in execute
    return wrapped_call(method(*args), self.execute)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 107, in wrapped_call
    call_outcome = CallOutcome(func)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 123, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 90, in pytest_runtest_call
    item.runtest()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/python.py", line 1174, in runtest
    self.ihook.pytest_pyfunc_call(pyfuncitem=self)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/python.py", line 204, in pytest_pyfunc_call
    testfunction(**testargs)
  File "/home/florian/proj/qutebrowser/git/tests/utils/test_log.py", line 238, in test_unfiltered
    qWarning("Hello World")
  File "/usr/lib64/python3.4/logging/__init__.py", line 1937, in _showwarning
    logger.warning("%s", s)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1286, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1409, in _log
    self.handle(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1419, in handle
    self.callHandlers(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1481, in callHandlers
    hdlr.handle(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 853, in handle
    self.emit(record)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/pytest_capturelog.py", line 222, in emit
    logging.StreamHandler.emit(self, record)
Message: '%s'
Arguments: ('/home/florian/proj/qutebrowser/git/tests/utils/test_log.py:238: DeprecationWarning: unhandled Python exceptions will call qFatal() in PyQt v5.5\n  qWarning("Hello World")\n',)
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib64/python3.4/logging/__init__.py", line 980, in emit
    stream.write(msg)
ValueError: I/O operation on closed file
Call stack:
  File "/usr/lib64/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/py/test.py", line 4, in <module>
    sys.exit(pytest.main())
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/config.py", line 41, in main
    return config.hook.pytest_cmdline_main(config=config)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 116, in pytest_cmdline_main
    return wrap_session(config, _main)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 84, in wrap_session
    doit(config, session)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 122, in _main
    config.hook.pytest_runtestloop(session=session)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 142, in pytest_runtestloop
    item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 393, in execute
    return wrapped_call(method(*args), self.execute)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 107, in wrapped_call
    call_outcome = CallOutcome(func)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 123, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 65, in pytest_runtest_protocol
    runtestprotocol(item, nextitem=nextitem)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 75, in runtestprotocol
    reports.append(call_and_report(item, "call", log))
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 119, in call_and_report
    call = call_runtest_hook(item, when, **kwds)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 137, in call_runtest_hook
    return CallInfo(lambda: ihook(item=item, **kwds), when=when)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 149, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 137, in <lambda>
    return CallInfo(lambda: ihook(item=item, **kwds), when=when)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 393, in execute
    return wrapped_call(method(*args), self.execute)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 107, in wrapped_call
    call_outcome = CallOutcome(func)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 123, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 90, in pytest_runtest_call
    item.runtest()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/python.py", line 1174, in runtest
    self.ihook.pytest_pyfunc_call(pyfuncitem=self)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/python.py", line 204, in pytest_pyfunc_call
    testfunction(**testargs)
  File "/home/florian/proj/qutebrowser/git/tests/utils/test_log.py", line 238, in test_unfiltered
    qWarning("Hello World")
  File "/usr/lib64/python3.4/logging/__init__.py", line 1937, in _showwarning
    logger.warning("%s", s)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1286, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1409, in _log
    self.handle(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1419, in handle
    self.callHandlers(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1481, in callHandlers
    hdlr.handle(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 853, in handle
    self.emit(record)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/pytest_capturelog.py", line 222, in emit
    logging.StreamHandler.emit(self, record)
Message: '%s'
Arguments: ('/home/florian/proj/qutebrowser/git/tests/utils/test_log.py:238: DeprecationWarning: unhandled Python exceptions will call qFatal() in PyQt v5.5\n  qWarning("Hello World")\n',)
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib64/python3.4/logging/__init__.py", line 980, in emit
    stream.write(msg)
ValueError: I/O operation on closed file
Call stack:
  File "/usr/lib64/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/py/test.py", line 4, in <module>
    sys.exit(pytest.main())
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/config.py", line 41, in main
    return config.hook.pytest_cmdline_main(config=config)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 116, in pytest_cmdline_main
    return wrap_session(config, _main)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 84, in wrap_session
    doit(config, session)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 122, in _main
    config.hook.pytest_runtestloop(session=session)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 142, in pytest_runtestloop
    item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 393, in execute
    return wrapped_call(method(*args), self.execute)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 107, in wrapped_call
    call_outcome = CallOutcome(func)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 123, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 65, in pytest_runtest_protocol
    runtestprotocol(item, nextitem=nextitem)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 75, in runtestprotocol
    reports.append(call_and_report(item, "call", log))
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 119, in call_and_report
    call = call_runtest_hook(item, when, **kwds)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 137, in call_runtest_hook
    return CallInfo(lambda: ihook(item=item, **kwds), when=when)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 149, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 137, in <lambda>
    return CallInfo(lambda: ihook(item=item, **kwds), when=when)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 393, in execute
    return wrapped_call(method(*args), self.execute)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 107, in wrapped_call
    call_outcome = CallOutcome(func)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 123, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 90, in pytest_runtest_call
    item.runtest()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/python.py", line 1174, in runtest
    self.ihook.pytest_pyfunc_call(pyfuncitem=self)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/python.py", line 204, in pytest_pyfunc_call
    testfunction(**testargs)
  File "/home/florian/proj/qutebrowser/git/tests/utils/test_log.py", line 238, in test_unfiltered
    qWarning("Hello World")
  File "/usr/lib64/python3.4/logging/__init__.py", line 1937, in _showwarning
    logger.warning("%s", s)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1286, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1409, in _log
    self.handle(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1419, in handle
    self.callHandlers(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1481, in callHandlers
    hdlr.handle(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 853, in handle
    self.emit(record)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/pytest_capturelog.py", line 222, in emit
    logging.StreamHandler.emit(self, record)
Message: '%s'
Arguments: ('/home/florian/proj/qutebrowser/git/tests/utils/test_log.py:238: DeprecationWarning: unhandled Python exceptions will call qFatal() in PyQt v5.5\n  qWarning("Hello World")\n',)
--- Logging error ---
Traceback (most recent call last):
  File "/usr/lib64/python3.4/logging/__init__.py", line 980, in emit
    stream.write(msg)
ValueError: I/O operation on closed file
Call stack:
  File "/usr/lib64/python3.4/runpy.py", line 170, in _run_module_as_main
    "__main__", mod_spec)
  File "/usr/lib64/python3.4/runpy.py", line 85, in _run_code
    exec(code, run_globals)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/py/test.py", line 4, in <module>
    sys.exit(pytest.main())
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/config.py", line 41, in main
    return config.hook.pytest_cmdline_main(config=config)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 116, in pytest_cmdline_main
    return wrap_session(config, _main)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 84, in wrap_session
    doit(config, session)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 122, in _main
    config.hook.pytest_runtestloop(session=session)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/main.py", line 142, in pytest_runtestloop
    item.config.hook.pytest_runtest_protocol(item=item, nextitem=nextitem)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 393, in execute
    return wrapped_call(method(*args), self.execute)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 107, in wrapped_call
    call_outcome = CallOutcome(func)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 123, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 65, in pytest_runtest_protocol
    runtestprotocol(item, nextitem=nextitem)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 75, in runtestprotocol
    reports.append(call_and_report(item, "call", log))
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 119, in call_and_report
    call = call_runtest_hook(item, when, **kwds)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 137, in call_runtest_hook
    return CallInfo(lambda: ihook(item=item, **kwds), when=when)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 149, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 137, in <lambda>
    return CallInfo(lambda: ihook(item=item, **kwds), when=when)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 393, in execute
    return wrapped_call(method(*args), self.execute)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 107, in wrapped_call
    call_outcome = CallOutcome(func)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 123, in __init__
    self.result = func()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/runner.py", line 90, in pytest_runtest_call
    item.runtest()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/python.py", line 1174, in runtest
    self.ihook.pytest_pyfunc_call(pyfuncitem=self)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 521, in __call__
    return self._docall(self.methods, kwargs)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 528, in _docall
    firstresult=self.firstresult).execute()
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/core.py", line 394, in execute
    res = method(*args)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/_pytest/python.py", line 204, in pytest_pyfunc_call
    testfunction(**testargs)
  File "/home/florian/proj/qutebrowser/git/tests/utils/test_log.py", line 238, in test_unfiltered
    qWarning("Hello World")
  File "/usr/lib64/python3.4/logging/__init__.py", line 1937, in _showwarning
    logger.warning("%s", s)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1286, in warning
    self._log(WARNING, msg, args, **kwargs)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1409, in _log
    self.handle(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1419, in handle
    self.callHandlers(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 1481, in callHandlers
    hdlr.handle(record)
  File "/usr/lib64/python3.4/logging/__init__.py", line 853, in handle
    self.emit(record)
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/pytest_capturelog.py", line 222, in emit
    logging.StreamHandler.emit(self, record)
Message: '%s'
Arguments: ('/home/florian/proj/qutebrowser/git/tests/utils/test_log.py:238: DeprecationWarning: unhandled Python exceptions will call qFatal() in PyQt v5.5\n  qWarning("Hello World")\n',)
Traceback (most recent call last):
  File "/home/florian/proj/qutebrowser/git/.tox/unittests/lib/python3.4/site-packages/pytestqt/qt_compat.py", line 104, in _Qt5MessageHandler
    handler(msg_type, msg)
TypeError: _Qt5MessageHandler() missing 1 required positional argument: 'msg'

@nicoddemus
Copy link
Member Author

Argh, I think I know what's going on... I had to create a thin wrapper so qInstallMessageHandler would have the same signature as Qt4's, and changed the positional arguments when doing so.

I will work on and the other points of your review tomorrow. Thanks! 😄

@nicoddemus
Copy link
Member Author

Unfortunately I couldn't reproduce the error you had in test_unfiltered, even after making the same changes as you (at least as they appear in the traceback you posted):

______________________ TestHideQtWarning.test_unfiltered ______________________

self = <test_log.TestHideQtWarning object at 0x060FDCB0>
caplog = <pytest_capturelog.CaptureLogFuncArg object at 0x060FDEB0>
qtlog = <pytestqt.plugin._QtMessageCapture object at 0x060FDC10>

    def test_unfiltered(self, caplog, qtlog):
        """Test a message which is not filtered."""
        with qtlog.disabled():
            with log.hide_qt_warning("World", logger='qt-tests'):
                with caplog.atLevel(logging.WARNING, logger='qt-tests'):
                    qWarning("Hello World")
>       assert len(caplog.records()) == 1
E       assert 0 == 1
E        +  where 0 = len([])
E        +    where [] = <bound method CaptureLogFuncArg.records of <pytest_capturelog.CaptureLogFuncArg object at 0x060FDEB0>>()
E        +      where <bound method CaptureLogFuncArg.records of <pytest_capturelog.CaptureLogFuncArg object at 0x060FDEB0>> = <pytest
_capturelog.CaptureLogFuncArg object at 0x060FDEB0>.records

Is this failing in a different branch perhaps?

Either way, I've removed the thin wrapper over qInstallMessageHandler, can you check again? If the error still occurs, could please push your qutebrowser branch so I can take a look myself? Thanks!

@nicoddemus
Copy link
Member Author

Hey @The-Compiler, did you had a chance of checking if this last changes fixes the problem you were having? Or if you point me to a branch in qutebrowser where I can test it myself, I would be help to. 😄

@The-Compiler
Copy link
Member

I now tried again (in the logtest branch) and couldn't reproduce it either.

However one test still fails (the one you showed above) which passed with pytest-qt 1.3.0. I don't really see why, but I haven't debugged it so far.

@nicoddemus
Copy link
Member Author

Oh ok, I will take a look and see if it's a problem with the test or with pytest-qt then. Thanks!

@nicoddemus
Copy link
Member Author

Hey @The-Compiler, finally could tackle this, sorry for taking this long.

I have figured out why TestHideQtWarning.test_unfiltered is failing in this branch. What's happening is this:

  1. pytest finishes collection and will start running the tests;

  2. pytest-qt uses pytest_runtest_setup to install its qInstallMessageHandler; at this point, there's no other handler installed so it stores None as previous handler;

    def _start(self):
        ...
        previous_handler = qInstallMessageHandler(self._handle_with_context)      
  3. The fixture app_and_logging in qutebrowser's conftest executes, calling init() which installs its own message handler:

    qInstallMessageHandler(qt_message_handler)
  4. The test starts, but when qtlog.disable() is called, it restores the previous handler it stored earlier, which was None at that point:

    def _stop(self):
        ...
        qInstallMessageHandler(self._previous_handler)  

    Effectivelly disabling all message handling, which is why the test then fails:

    >       assert len(caplog.records()) == 1
    E       assert 0 == 1
    E        +  where 0 = len([])
    E        +    where [] = <bound method CaptureLogFuncArg.records of <pytest_capturelog.CaptureLogFuncArg object at 0x060FDEB0>>()
    E        +      where <bound method CaptureLogFuncArg.records of <pytest_capturelog.CaptureLogFuncArg object at 0x060FDEB0>> = <pytest
    _capturelog.CaptureLogFuncArg object at 0x060FDEB0>.records
    

I hope all my explanation makes sense. 😄

In summary, the problem is that there's a conflict between pytest-qt qt logging capture and your solution implemented in tests/log.py, and as far as I can see they have the same purpose, which is to print qt logging information during testing.

I see a couple of options:

  • Disable pytest-qt's logging capture altogether: that's the easiest as it is a simple matter of adding an option to pytest.ini and stop using qtlog.disable;
  • Replace your solution in qutebrowser/tests/log.py with pytest-qt's; it seems simple, but I'm not sure if that's desirable as qutebrowser has its own solution in qutebrowser/utils/log.py for capturing qt messages into logging and you might be uncomfortable with your tests using a different mechanism. But again, you seem to be already using pytest-qt's options in your tox.ini (qt_log_level_fail and qt_log_ignore), so this might be the best solution in the long run.

Let me know what you think, I would be glad to help with a PR or otherwise. 😄

Cheers,
🍻

@The-Compiler
Copy link
Member

Thanks for the great explanation, it makes total sense! 😉

I already fixed the tests a while ago by using the loggers directly instead of qWarning() since what I actually want to test is the log filtering anyways.

So I think this can be merged now (at least from my POV), in the hope someone other than me will find it useful 😄

nicoddemus added a commit that referenced this pull request Jun 29, 2015
@nicoddemus nicoddemus merged commit 594e537 into master Jun 29, 2015
@nicoddemus nicoddemus deleted the disable-qtlog branch June 29, 2015 20:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants