0

I want to exclude some abstract methods from code coverage and followed the suggestion of using an exception and a .coveragerc file as described here

This method works fine, if I run coverage from command line. The report excludes the lines as expected.

If I use the PyDev code coverage view, the lines are still reported as missing. I think that I have to put the file somewhere else to work with PyDev coverage support, but I have no idea where. It is supposed to be in the folder, where coverage.py is run from. I already tried the module folder with no success.

I use

  • Eclipse Oxygen.3a Release (4.7.3a)
  • PyDev 6.3.2.201803171248
  • coverage 4.5.1
Cryn
  • 885
  • 1
  • 8
  • 12

1 Answers1

0

the .coveragerc file must be placed in the <eclipse-workspace>/.metadata/.plugins/org.python.pydev.debug/coverage folder for the PyDev coverage to pick up the changed config.

Although branch coverage can be generated, it is not shown in the PyDev coverage view inside eclipse. I enabled branch coverage with:

[run]
branch = True
Cryn
  • 885
  • 1
  • 8
  • 12