{"action":"created","issue":{"url":"https://api.github.com/repos/pytest-dev/pytest-cov/issues/84","labels_url":"https://api.github.com/repos/pytest-dev/pytest-cov/issues/84/labels{/name}","comments_url":"https://api.github.com/repos/pytest-dev/pytest-cov/issues/84/comments","events_url":"https://api.github.com/repos/pytest-dev/pytest-cov/issues/84/events","html_url":"https://github.com/pytest-dev/pytest-cov/issues/84","id":102457579,"number":84,"title":"_pytest.assertion.reinterpret.AssertionError: Test coverage should never be `None`","user":{"login":"msabramo","id":305268,"avatar_url":"https://avatars.githubusercontent.com/u/305268?v=3","gravatar_id":"","url":"https://api.github.com/users/msabramo","html_url":"https://github.com/msabramo","followers_url":"https://api.github.com/users/msabramo/followers","following_url":"https://api.github.com/users/msabramo/following{/other_user}","gists_url":"https://api.github.com/users/msabramo/gists{/gist_id}","starred_url":"https://api.github.com/users/msabramo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msabramo/subscriptions","organizations_url":"https://api.github.com/users/msabramo/orgs","repos_url":"https://api.github.com/users/msabramo/repos","events_url":"https://api.github.com/users/msabramo/events{/privacy}","received_events_url":"https://api.github.com/users/msabramo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":4,"created_at":"2015-08-21T20:38:57Z","updated_at":"2015-08-21T21:13:48Z","closed_at":"2015-08-21T21:13:48Z","body":"With pytest-cov 2.0, I'm getting:\r\n\r\n```\r\n_pytest.assertion.reinterpret.AssertionError: Test coverage should never be `None`\r\n```\r\n\r\nOn the same projects with pytest-cov 1.8.1, it works fine.\r\n\r\nExample command-line:\r\n\r\n```\r\n$ tox -e py27\r\n...\r\n------------------------------------------------------------------------------------------------------------------------------- generated xml file: /home/monkey/ce402c011ae38dae/junit.xml --------------------------------------------------------------------------------------------------------------------------------\r\n------------------------------------------------------------------------------------------------------------------------------------- coverage: platform linux2, python 2.7.6-final-0 --------------------------------------------------------------------------------------------------------------------------------------\r\nName                                                    Stmts   Miss  Cover   Missing\r\n-------------------------------------------------------------------------------------\r\nusersvc/__init__                                          196      0   100%\r\nusersvc/appstatus                                          27     21    22%   9-16, 20-27, 31-38\r\nusersvc/lib/__init__                                        2      0   100%\r\nusersvc/lib/cache                                           6      0   100%\r\n...\r\nTraceback (most recent call last):\r\n  File \".tox/py27/bin/py.test\", line 11, in <module>\r\n    sys.exit(main())\r\n  File \"/home/monkey/ce402c011ae38dae/.tox/py27/local/lib/python2.7/site-packages/_pytest/config.py\", line 41, in main\r\n    return config.hook.pytest_cmdline_main(config=config)\r\n  File \"/home/monkey/ce402c011ae38dae/.tox/py27/local/lib/python2.7/site-packages/_pytest/core.py\", line 521, in __call__\r\n    return self._docall(self.methods, kwargs)\r\n  File \"/home/monkey/ce402c011ae38dae/.tox/py27/local/lib/python2.7/site-packages/_pytest/core.py\", line 528, in _docall\r\n    firstresult=self.firstresult).execute()\r\n  File \"/home/monkey/ce402c011ae38dae/.tox/py27/local/lib/python2.7/site-packages/_pytest/core.py\", line 394, in execute\r\n    res = method(*args)\r\n  File \"/home/monkey/ce402c011ae38dae/.tox/py27/local/lib/python2.7/site-packages/_pytest/main.py\", line 116, in pytest_cmdline_main\r\n    return wrap_session(config, _main)\r\n  File \"/home/monkey/ce402c011ae38dae/.tox/py27/local/lib/python2.7/site-packages/_pytest/main.py\", line 109, in wrap_session\r\n    exitstatus=session.exitstatus)\r\n  File \"/home/monkey/ce402c011ae38dae/.tox/py27/local/lib/python2.7/site-packages/_pytest/core.py\", line 521, in __call__\r\n    return self._docall(self.methods, kwargs)\r\n  File \"/home/monkey/ce402c011ae38dae/.tox/py27/local/lib/python2.7/site-packages/_pytest/core.py\", line 528, in _docall\r\n    firstresult=self.firstresult).execute()\r\n  File \"/home/monkey/ce402c011ae38dae/.tox/py27/local/lib/python2.7/site-packages/_pytest/core.py\", line 393, in execute\r\n    return wrapped_call(method(*args), self.execute)\r\n  File \"/home/monkey/ce402c011ae38dae/.tox/py27/local/lib/python2.7/site-packages/_pytest/core.py\", line 109, in wrapped_call\r\n    wrap_controller.send(call_outcome)\r\n  File \"/home/monkey/ce402c011ae38dae/.tox/py27/local/lib/python2.7/site-packages/_pytest/terminal.py\", line 362, in pytest_sessionfinish\r\n    self.config.hook.pytest_terminal_summary(terminalreporter=self)\r\n  File \"/home/monkey/ce402c011ae38dae/.tox/py27/local/lib/python2.7/site-packages/_pytest/core.py\", line 521, in __call__\r\n    return self._docall(self.methods, kwargs)\r\n  File \"/home/monkey/ce402c011ae38dae/.tox/py27/local/lib/python2.7/site-packages/_pytest/core.py\", line 528, in _docall\r\n    firstresult=self.firstresult).execute()\r\n  File \"/home/monkey/ce402c011ae38dae/.tox/py27/local/lib/python2.7/site-packages/_pytest/core.py\", line 394, in execute\r\n    res = method(*args)\r\n  File \"/home/monkey/ce402c011ae38dae/.tox/py27/local/lib/python2.7/site-packages/pytest_cov/plugin.py\", line 164, in pytest_terminal_summary\r\n    assert total is not None, 'Test coverage should never be `None`'\r\n_pytest.assertion.reinterpret.AssertionError: Test coverage should never be `None`\r\nERROR: InvocationError: '/home/monkey/ce402c011ae38dae/.tox/py27/bin/py.test --teamcity --cov=usersvc --cov-report=html --cov-report=xml --cov-report=annotate'\r\n_________________________________________________________________________________________________________________________________________________________ summary __________________________________________________________________________________________________________________________________________________________\r\nERROR:   py27: commands failed\r\n```\r\n\r\nAs you can see it actually prints a coverage report to stdout, so I don't know why it thinks the test coverage is `None`.\r\n\r\nHere's what's installed:\r\n\r\n```\r\n$ .tox/py27/bin/pip freeze | egrep 'pytest|cov'\r\nYou are using pip version 7.1.0, however version 7.1.1 is available.\r\nYou should consider upgrading via the 'pip install --upgrade pip' command.\r\ncov-core==1.15.0\r\ncoverage==3.7.1\r\npytest==2.7.2\r\npytest-cov==2.0.0\r\npytest-xdist==1.13.1\r\n```"},"comment":{"url":"https://api.github.com/repos/pytest-dev/pytest-cov/issues/comments/133565064","html_url":"https://github.com/pytest-dev/pytest-cov/issues/84#issuecomment-133565064","issue_url":"https://api.github.com/repos/pytest-dev/pytest-cov/issues/84","id":133565064,"user":{"login":"msabramo","id":305268,"avatar_url":"https://avatars.githubusercontent.com/u/305268?v=3","gravatar_id":"","url":"https://api.github.com/users/msabramo","html_url":"https://github.com/msabramo","followers_url":"https://api.github.com/users/msabramo/followers","following_url":"https://api.github.com/users/msabramo/following{/other_user}","gists_url":"https://api.github.com/users/msabramo/gists{/gist_id}","starred_url":"https://api.github.com/users/msabramo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/msabramo/subscriptions","organizations_url":"https://api.github.com/users/msabramo/orgs","repos_url":"https://api.github.com/users/msabramo/repos","events_url":"https://api.github.com/users/msabramo/events{/privacy}","received_events_url":"https://api.github.com/users/msabramo/received_events","type":"User","site_admin":false},"created_at":"2015-08-21T21:13:47Z","updated_at":"2015-08-21T21:13:47Z","body":"Hmmm, upgrading from teamcity-messages 1.9.4 to 1.14 seems to fix the problem.\r\n\r\nHope this helps someone."}}