For Jedi we want to generate our test coverage. There is a related question in stackoverflow, but it didn\'t help.
We\'re using py.test as a test runner. However, w
I fixed the test coverage to 94% by this patch that simplifies import dependencies and by the command:
py.test --cov jedi test # or
py.test --cov jedi test --cov-report=html # + a listing with red uncovered lines
Uncovered lines are only in conditional commands or in some less used functions but all headers are completely covered.
The problem was that the tests configuration test/conftest.py did import prematurely by dependencies almost all files in the project. The conftest file defines also additional command line options and settings that should be set before running the test. Therefore I think that pytest_cov plugin works correctly if it ignores everything that was imported together with this file, although it is a pain. I excluded also __init__.py and settings.py from the report because they are simple and with the complete coverage but they are also imported prematurely in the dependency of conftest.