PyTest icon indicating copy to clipboard operation
PyTest copied to clipboard

Enhancement: Indicate test status on function

Open pykong opened this issue 5 years ago • 1 comments

@kaste First of all a Big Thanks for putting up this very facile plugin!

Visual Studio annotates functions with symbols indicating whether they passed a test or whether test coverage for a function exists (https://res.infoq.com/news/2017/02/Live-Unit-Testing/en/resources/live-test.gif).

I believe such visual indication would be a huge power-up for PyTest as well because of its directly linking test result on the very function being tested.

That feature could be implemented via phantoms. Alternatively, in a less favored implementation, the gutter could be used to display the symbols.

Mock-up: g884 (symbols for pass | fail | uncovered)

pykong avatar May 20 '19 18:05 pykong

Looks interesting but I have no idea .. This basically combines coverage with test info, and we don't run coverage here (a user could). Your mock-up annotates the source code, the image you link to looks more like typical coverage annotations for test files.

How should we do this? How do you reduce the whole coverage info to just the function definition lines? How do you compute that a function failed, except when it throws of course.

kaste avatar May 21 '19 18:05 kaste