Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enhancement: Indicate test status on function #20

Open
pykong opened this issue May 20, 2019 · 1 comment
Open

Enhancement: Indicate test status on function #20

pykong opened this issue May 20, 2019 · 1 comment

Comments

@pykong
Copy link
Contributor

pykong commented May 20, 2019

@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)

@kaste
Copy link
Owner

kaste commented May 21, 2019

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants