3

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?

Community
  • 1
  • 1
Roger Veciana
  • 983
  • 1
  • 12
  • 25
  • Hard to know what was wrong without more info... can you give the steps you're following which are not working? Are you following http://pydev.org/manual_adv_coverage.html? – Fabio Zadrozny May 08 '15 at 13:00
  • I have installed the coveragy.py program with pydev following: http://pydev.org/manual_adv_coverage.html All steps work, except the reports at the report window, that don't appear. But I know that the info is actually generated at the indicated directory. I'm using Ubuntu 13.04 with eclipse Kepler Service Release 2 and pydev 3.5.0 – Roger Veciana May 11 '15 at 11:50

1 Answers1

6

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! ;-)

Community
  • 1
  • 1
saaj
  • 23,253
  • 3
  • 104
  • 105