{"action":"closed","issue":{"url":"https://api.github.com/repos/pytest-dev/pytest-qt/issues/56","labels_url":"https://api.github.com/repos/pytest-dev/pytest-qt/issues/56/labels{/name}","comments_url":"https://api.github.com/repos/pytest-dev/pytest-qt/issues/56/comments","events_url":"https://api.github.com/repos/pytest-dev/pytest-qt/issues/56/events","html_url":"https://github.com/pytest-dev/pytest-qt/issues/56","id":86213528,"number":56,"title":"Context manager to disable logging handler","user":{"login":"nicoddemus","id":1085180,"avatar_url":"https://avatars.githubusercontent.com/u/1085180?v=3","gravatar_id":"","url":"https://api.github.com/users/nicoddemus","html_url":"https://github.com/nicoddemus","followers_url":"https://api.github.com/users/nicoddemus/followers","following_url":"https://api.github.com/users/nicoddemus/following{/other_user}","gists_url":"https://api.github.com/users/nicoddemus/gists{/gist_id}","starred_url":"https://api.github.com/users/nicoddemus/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/nicoddemus/subscriptions","organizations_url":"https://api.github.com/users/nicoddemus/orgs","repos_url":"https://api.github.com/users/nicoddemus/repos","events_url":"https://api.github.com/users/nicoddemus/events{/privacy}","received_events_url":"https://api.github.com/users/nicoddemus/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-06-08T15:05:32Z","updated_at":"2015-06-29T20:57:15Z","closed_at":"2015-06-29T20:57:15Z","body":"Add a context manager to `qtlog` fixture that disables the custom handler:\r\n\r\n```python\r\ndef test_foo(qtlog):\r\n    with qtlog.disabled():\r\n         # in this block the original qInstallMsgHandler function is active\r\n```\r\n\r\nAlso implement a mark which does the same thing but for the entire test:\r\n\r\n```python\r\n@pytest.mark.no_qt_log\r\ndef test_foo(qtlog):\r\n     # in this test the original qInstallMsgHandler function is active\r\n```\r\n\r\n(Feature idea from @The-Compiler in #54)."}}