Pydev codecoverage results don't appear

家住魔仙堡 提交于 2019-12-07 14:18:49

问题


I have set up the codecoverage to run with pydev, but the results don't appear.

Following this answer I found the .coverage file at ~/.metadata/.plugins/org.python.pydev.debug/coverage, and that works properly (gives the result when running coverage report there, gets empty when I do it from pydev, etc).

Does somebody know where can I configure the path to get the results to the Eclipse plugin?


回答1:


I just had the same problem and the solution was to install coverage from 3.x branch (i.e. pip install "coverage < 4.0.0").

There's a hint on PyDev coverage documentation page:

... the integration is tested with version 3.4, so, this is the recommended version.

Coverage v4 has default report file name and its format changed. Older file name was ~/.metadata/.plugins/org.python.pydev.debug/coverage/.coverage and it contained binary marshal'ed output (according to this answer). Newer is in ~/.metadata/.plugins/org.python.pydev.debug/coverage/.coverage.0 and it contains JSON string prefixed with !coverage.py: This is a private format, don't read it directly! ;-)



来源:https://stackoverflow.com/questions/30074927/pydev-codecoverage-results-dont-appear

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!