{"action":"opened","issue":{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/1077","labels_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/1077/labels{/name}","comments_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/1077/comments","events_url":"https://api.github.com/repos/The-Compiler/qutebrowser/issues/1077/events","html_url":"https://github.com/The-Compiler/qutebrowser/issues/1077","id":113755117,"number":1077,"title":"Upgrade to pytest 2.8","user":{"login":"The-Compiler","id":625793,"avatar_url":"https://avatars.githubusercontent.com/u/625793?v=3","gravatar_id":"","url":"https://api.github.com/users/The-Compiler","html_url":"https://github.com/The-Compiler","followers_url":"https://api.github.com/users/The-Compiler/followers","following_url":"https://api.github.com/users/The-Compiler/following{/other_user}","gists_url":"https://api.github.com/users/The-Compiler/gists{/gist_id}","starred_url":"https://api.github.com/users/The-Compiler/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/The-Compiler/subscriptions","organizations_url":"https://api.github.com/users/The-Compiler/orgs","repos_url":"https://api.github.com/users/The-Compiler/repos","events_url":"https://api.github.com/users/The-Compiler/events{/privacy}","received_events_url":"https://api.github.com/users/The-Compiler/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/labels/component:%20tests","name":"component: tests","color":"5319e7"},{"url":"https://api.github.com/repos/The-Compiler/qutebrowser/labels/priority:%201%20-%20middle","name":"priority: 1 - middle","color":"009800"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":0,"created_at":"2015-10-28T06:51:47Z","updated_at":"2015-10-28T06:51:47Z","closed_at":null,"body":"Now that the regressions are getting less, I guess it's time to update to pytest 2.8 after the `bdd` branch is merged.\r\n\r\nSome issues:\r\n\r\n- [x] `test_check_coverage.py` has some issues (fixed in 497fba5667e7b17746746ecc732e62f57b973ea6):\r\n\r\n```\r\n[...]\r\nE           py.error.ENOENT: [No such file or directory]: open('/tmp/pytest-of-florian/pytest-2/testdir/test_tested_unlisted0/coverage.xml', 'r')\r\n\r\n/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/py/_error.py:84: ENOENT\r\n---------------------- Captured stderr call -----------------------\r\nINTERNALERROR> Traceback (most recent call last):\r\nINTERNALERROR>   File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/_pytest/main.py\", line 86, in wrap_session\r\nINTERNALERROR>     config._do_configure()\r\nINTERNALERROR>   File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/_pytest/config.py\", line 830, in _do_configure\r\nINTERNALERROR>     self.hook.pytest_configure.call_historic(kwargs=dict(config=self))\r\nINTERNALERROR>   File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py\", line 729, in call_historic\r\nINTERNALERROR>     self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)\r\nINTERNALERROR>   File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py\", line 338, in _hookexec\r\nINTERNALERROR>     return self._inner_hookexec(hook, methods, kwargs)\r\nINTERNALERROR>   File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py\", line 333, in <lambda>\r\nINTERNALERROR>     _MultiCall(methods, kwargs, hook.spec_opts).execute()\r\nINTERNALERROR>   File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py\", line 596, in execute\r\nINTERNALERROR>     res = hook_impl.function(*args)\r\nINTERNALERROR>   File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/pytest_faulthandler.py\", line 23, in pytest_configure\r\nINTERNALERROR>     stderr_fd_copy = os.dup(sys.stderr.fileno())\r\nINTERNALERROR> io.UnsupportedOperation: fileno\r\n\r\n[...]\r\n\r\nTraceback (most recent call last):\r\n  File \"/usr/lib64/python3.5/runpy.py\", line 170, in _run_module_as_main\r\n    \"__main__\", mod_spec)\r\n  File \"/usr/lib64/python3.5/runpy.py\", line 85, in _run_code\r\n    exec(code, run_globals)\r\n  File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/py/test.py\", line 4, in <module>\r\n    sys.exit(pytest.main())\r\n  File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/_pytest/config.py\", line 48, in main\r\n    return config.hook.pytest_cmdline_main(config=config)\r\n  File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py\", line 724, in __call__\r\n    return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)\r\n  File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py\", line 338, in _hookexec\r\n    return self._inner_hookexec(hook, methods, kwargs)\r\n  File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py\", line 333, in <lambda>\r\n    _MultiCall(methods, kwargs, hook.spec_opts).execute()\r\n  File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py\", line 596, in execute\r\n    res = hook_impl.function(*args)\r\n  File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/_pytest/main.py\", line 115, in pytest_cmdline_main\r\n    return wrap_session(config, _main)\r\n  File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/_pytest/main.py\", line 110, in wrap_session\r\n    exitstatus=session.exitstatus)\r\n  File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py\", line 724, in __call__\r\n    return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)\r\n  File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py\", line 338, in _hookexec\r\n    return self._inner_hookexec(hook, methods, kwargs)\r\n  File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py\", line 333, in <lambda>\r\n    _MultiCall(methods, kwargs, hook.spec_opts).execute()\r\n  File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py\", line 595, in execute\r\n    return _wrapped_call(hook_impl.function(*args), self.execute)\r\n  File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py\", line 249, in _wrapped_call\r\n    wrap_controller.send(call_outcome)\r\n  File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/_pytest/terminal.py\", line 361, in pytest_sessionfinish\r\n    outcome.get_result()\r\n  File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py\", line 278, in get_result\r\n    raise ex[1].with_traceback(ex[2])\r\n  File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py\", line 264, in __init__\r\n    self.result = func()\r\n  File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/_pytest/vendored_packages/pluggy.py\", line 596, in execute\r\n    res = hook_impl.function(*args)\r\n  File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/pytest_cov/plugin.py\", line 160, in pytest_sessionfinish\r\n    self.cov_controller.finish()\r\n  File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/pytest_cov/engine.py\", line 140, in finish\r\n    self.cov.stop()\r\n  File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/coverage/control.py\", line 692, in stop\r\n    self.collector.stop()\r\n  File \"/home/florian/proj/qutebrowser/git/.tox/py35/lib/python3.5/site-packages/coverage/collector.py\", line 277, in stop\r\n    \"Expected current collector to be %r, but it's %r\" % (self, self._collectors[-1])\r\nAssertionError: Expected current collector to be <Collector at 0x7f6886e039e8: CTracer>, but it's <Collector at 0x7f6828f6a208: CTracer>\r\n```\r\n\r\n- [ ] `check_coverage.py` doesn't like the file paths?\r\n\r\n```\r\n/home/florian/proj/qutebrowser/git/qutebrowser/browser/cookies.py has 100% coverage but is not in perfect_files!\r\n/home/florian/proj/qutebrowser/git/qutebrowser/browser/http.py has 100% coverage but is not in perfect_files!\r\n[...]\r\n```\r\n\r\n- [ ] Wait for `pytest-catchlog` release and switch to it, as `pytest-capturelog` uses deprecated `__multicall__`\r\n- [ ] `pytest-bdd` shows deprecations too: https://github.com/pytest-dev/pytest-bdd/issues/154\r\n"}}