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

refresh coverage lines #6

Closed
juanpabloaj opened this issue Sep 4, 2014 · 7 comments
Closed

refresh coverage lines #6

juanpabloaj opened this issue Sep 4, 2014 · 7 comments

Comments

@juanpabloaj
Copy link

I run coverage

coverage run setup.py test

in vim, open coveragepy

 :Coveragepy show

ok. Then I modifify the code and run coverage again (in other terminal, without close vim)

coverage run setup.py test

and hide and show Coveragepy

 :Coveragepy show
 :Coveragepy show

but, the coverages lines don't are updated.

@juanpabloaj
Copy link
Author

with

:Coveragepy report

the lines are updates :)

@alfredodeza
Copy link
Owner

right, :Coveragepy show will only re-read the report, it will not re-process it.

But maybe it should?

@alfredodeza
Copy link
Owner

ah wait, no, it should not re-process it because processing the report means waiting on coveragepy to read the file and spit out the results:

coverage report -m -i /path/to/coveragepy_report

And that would be just tedious.

@eprigorodov
Copy link
Contributor

eprigorodov commented Dec 1, 2016

This function, refreshing coverage marks without opening report buffer, still seems to be desirable for work on completing test coverage. My typical cycle is: scroll to some uncovered lines, write corresponding unit tests in adjacent split buffer, re-run unit tests under coverage.py. And then I would like to see newly covered lines green and move to the next batch. Using :Coveragepy report for that requires switching to report buffer and closing it, which is just a waste of time on each cycle.

How about adding :Coveragepy refresh command which would invoke coverage report and update coverage marks without opening report window? I already have a patch.

@alfredodeza alfredodeza reopened this Dec 2, 2016
@alfredodeza
Copy link
Owner

@eprigorodov I like your solution :)

eprigorodov added a commit to eprigorodov/coveragepy.vim that referenced this issue Dec 2, 2016
@eprigorodov
Copy link
Contributor

And I like your plugin, it just works and does what was needed. Please have a look at PR #17. Thank you :)

alfredodeza added a commit that referenced this issue Dec 6, 2016
@alfredodeza
Copy link
Owner

Fixed with PR #17

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

3 participants