ctrl+shift+p filters: :st2 :st3 :win :osx :linux
Browse

Py​Cover

Sublime Text 2/3 plugin for showing Python coverage information.

Details

Installs

  • Total 9K
  • Win 4K
  • Mac 3K
  • Linux 2K
Feb 28 Feb 27 Feb 26 Feb 25 Feb 24 Feb 23 Feb 22 Feb 21 Feb 20 Feb 19 Feb 18 Feb 17 Feb 16 Feb 15 Feb 14 Feb 13 Feb 12 Feb 11 Feb 10 Feb 9 Feb 8 Feb 7 Feb 6 Feb 5 Feb 4 Feb 3 Feb 2 Feb 1 Jan 31 Jan 30 Jan 29 Jan 28 Jan 27 Jan 26 Jan 25 Jan 24 Jan 23 Jan 22 Jan 21 Jan 20 Jan 19 Jan 18 Jan 17 Jan 16 Jan 15
Windows 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
Mac 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0
Linux 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0

Readme

Source
raw.​githubusercontent.​com

PyCover

A plugin for Sublime Text 2/3 that can highlight lines of Python lacking test coverage, based on the output of Ned Batchelder's coverage.py, based on the original plugin for ST2, SublimePythonCoverage.

Default sublime theme Cobalt2 theme

Installation

Set up Sublime Package Control if you don't have it yet.

Go to Tools > Command Palette. Type Package Control: Install Package and hit enter. Type PyCover and hit enter.

PyCover relies on the external coverage.py package, which you can install with

pip install coverage

Usage

Toggle missing line highlights by running the show_python_coverage command, bound to ctrl+alt+shift+c by default. You can also access it with the Command Palette under “Toggle Uncovered Lines”, or via the right-click menu.

Settings

With the settings option "onload": true, PyCover will start highlighting missing lines as soon as your file loads.

The highlight_uncovered_lines option is used to toggle highlighting of uncovered lines. When this option is set to true, uncovered lines are highlighted in both editor window and minimap. However, this can be disruptive to the experience for some users, so by default this option is set to false.

Highlight uncovered lines of code

Details

PyCover works by looking in all parent directories of the active file until it finds a .coverage file (as produced by coverage.py). Obviously, it only works if that file exists and contains coverage information for the file you opened.

Once the .coverage file is found, PyCover invoke the coverage module with system Python (see the 'python' settings option to change this) and highlights any missing lines with a gutter mark.