Closed Lucas-Steinmann closed 1 year ago
I found a workaround.
I specified the root folder of the repository with a single --cov=
instead of the library folders. Then I added all directories, which should be ignored to the pyproject.toml
in the root folder:
[tool.coverage.run]
omit = ['*/tests/*']
Alternatively, you can also use .coveragerc
:
[run]
omit = ['*/tests/*']
@Lucas-Steinmann Thanks for the ticket and good to hear you figured out a workaround. The extension leverages nodejs modules that consume different types of lcov files and more than likely multiple source support would have to be implemented there instead 🤔.
Is your feature request related to a problem? Please describe. My coverage reports (generated by
pytest-cov
) have multiple<source>
nodes, since I have a mono repository with multiple sub projects. E.g.This is achieved by adding multiple
--cov=
arguments to pytest.VSCode Coverage gutters only considers the first source and does not display gutters for files belonging to other sources. The log does not show any errors either.
I can validate this when swapping the order of the sources (which is somewhat tiresome).
Describe the solution you'd like Search all
<source>
for each package/class.Describe alternatives you've considered Display a warning, that this is not supported.
Additional context
Showing a coverage report does not work either, but I'm not sure if this is related.
Thank you for your work on this extension.