Highlights test covered python code on the editor. This extension uses the results of pytest-cov/coverage.py (.coverage by default) to highlight covered code.
Highlights uncovered(default) or covered code (set via settings).
Displays coverage stats and highlight mode in the IDE status bar.
The extension requires the following modules on your python environment.
pip install pytest
pip install pytest-cov
This extension contributes the following settings:
python.coveragepy.file: The coverage.py internal file for saving coverage results.
python.coverageView.highlight: Highlight color.
python.coverageView.highlightMode: Highlight mode: uncovered(default) or covered.
Initial version. WARNING: This was created to support the author's workflow at work and a means to learn how to create VS Code extensions :D Please email: firstname.lastname@example.org for suggestions/improvements.
Modified document processing to exclude py-docstrings in uncovered lines.
Added def lines as ignored line.
Modified status display - now displays stats for current python file in active editor with the OVERALL coverage.
Will not highlight "blank" lines, although coverage.py might still detect them as uncovered.
Added Status bar item for displaying Highlight mode as well as coverage stats.
Ignore pass and else: lines in highlighting
Py Cov now runs in a background shell via exec
Minor changes, skipped version
Does not highlight comment lines.
Changed option name for highlight: python.coverageView.highlight
Added highlight mode.
From this version: by default, uncovered code will be highlighted. This behavior can be modified via the python.coverageView.highlightMode option.