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

Py​Cover

by perimosocordiae ST2/ST3

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

Details

Installs

  • Total 8K
  • Win 3K
  • OS X 2K
  • Linux 2K
Oct 20 Oct 19 Oct 18 Oct 17 Oct 16 Oct 15 Oct 14 Oct 13 Oct 12 Oct 11 Oct 10 Oct 9 Oct 8 Oct 7 Oct 6 Oct 5 Oct 4 Oct 3 Oct 2 Oct 1 Sep 30 Sep 29 Sep 28 Sep 27 Sep 26 Sep 25 Sep 24 Sep 23 Sep 22 Sep 21 Sep 20 Sep 19 Sep 18 Sep 17 Sep 16 Sep 15 Sep 14 Sep 13 Sep 12 Sep 11 Sep 10 Sep 9 Sep 8 Sep 7 Sep 6
Windows 0 0 0 1 0 0 0 0 1 2 1 0 1 0 1 0 0 2 0 0 0 1 0 1 2 1 1 0 0 0 2 2 0 2 0 1 1 0 1 1 1 0 0 0 2
OS X 0 0 0 0 0 0 0 0 0 1 2 1 1 0 0 0 0 0 1 0 0 0 0 0 0 1 0 0 0 0 0 2 2 1 3 0 0 0 0 0 1 0 1 0 2
Linux 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 1 0 0 0 0 0 1 0 0 1 0 0 1 0 0 0 0 1 1 0 1 1 0 1 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.