Giter Club home page Giter Club logo

coveragepy.vim's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

coveragepy.vim's Issues

Request: alternative, subtler display style.

It would be nice, for integration with other gutter symbols and a less-strong desire to only use the current presentation for brief glances (ze goggles, zey do nothing!), if lines not covered by tests be annotated with a warning-level "TT" compared to the current, high-contrast background.

Thanks!

test cases in subfolder

In our environment we have our test cases in a sub-folder named _test. When running
coverage inside the _test folder coveragepy cant open the .coverage file maybe because it contains long paths to the files in the parent folder.

Error detected while processing function 23_Proxy..23_HighlightMissing:
line 13:
E63: Invalid use of _

Environment:

  • Windows 7 64bit
  • Vim 7.3 +python

Signs are always placed in the first pane

Hello! Iā€™m trying out this plugin. I work with tabs and panes a lot and happened to have the plugin file, a Python module and its tests all open in three panes. When running Coveragepy report in the module or tests file pane, the first one got the gutter decoration.

Session show toggle off sign marks

If you toggle off a session currently the buffer is removed but the signs are left behind.
It would be nice if there is an option or it defaults to removing the signs when closing the buffer

Highlighting does not work in Windows

Highlighting fails in windows because the file system paths contain backslashes.
When you match the path from g:coveragepy_session_map against the absolute path of the current buffer, it will always return 0 because of the way backslashes behave in regex patterns.
To fix this, I changed the pattern like this: let path_pattern = '\M' . substitute(path, '\\', '\\\\', 'g')
Doubling the backslashes will make the pattern work as expected.
I only tested on Windows, but I don't see any reason why it wouldn't work on *nix systems as well.

Detecting coverage executable, handling py2/py3

When both /usr/bin/python-coverage and /usr/bin/python3-coverage are installed, coveragepy.vim uses the first one even if the coverage report has been created from Python 3.
When only /usr/bin/python3-coverage is installed, coveragepy.vim does not use it.

Using the wrong version leads to misleading ouput showing some files as 100% covered.

Some hints, warnings or autodetection would be nice. Thanks!

refresh coverage lines

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.

100% Coverage when much is uncovered

I'm using:

  • Python 3.11.2
  • coveragepy version 7.4.0
  • pytest version 7.4.3
  • pytest-cov 4.1.0

I'm trying to get coveragepy.vim to work, but I can't seem to get the coverage portion to see uncovered lines.

Assume I clone this ciscoconfparse2 repo (ref git hash 2feeff184d4dee6a2c3b10ff756e0e1151f2ffd2) and then edit ciscoconfparse2/models_cisco.py. I currently see Coveragepy ==> 100% covered when I run :Coveragepy show, but that's obviously not true. There are loads of uncovered methods in that file.

How do I debug / fix what is wrong?

image

HighlightMissing getting called

When I try to run any of the commands, I see a ton of echos about "Current buffer" and file. While a report eventually loads, the signs don't seem to function properly

Current buffer shows as an absolute path without .py on the end
file shows as a relative path with .py on the end

I traced this down to this function in the code: https://github.com/alfredodeza/coveragepy.vim/blob/master/ftplugin/python/coveragepy.vim#L106

If I change that [1] to a [0] (essentially negating the stripping of the .py I believe,) I see no echos and everything appears to work.

Bad window height when showing report

Hello, I'm trying this plugin it does what it says, and that's great!, however I'm having a weird (and annoying) behaviour when running :Coveragepy report the report opens up fitting all the available height in vim and my actual code window is reduced to only one line height, let me show you what I mean:

screen shot 2016-03-15 at 22 57 04

Is there some option to set to fix the report window height?

Thanks

Error 117: Unknown function: execute

Installed using vundle, a very strange error, but I don't really know how to interpret it at all - I can do :execute in the vim command line so I cant see why it would complain about this... any hints?
More context - my .coverage file is in the root of my project, and I am using pytest-cov to generate it.

Version comes up as 1.1dev

:Coveragepy show

Error detected while processing function <SNR>98_Proxy[4]..<SNR>98_ToggleSigns[3]..<SNR>98_ClearSigns:
line    1:
E117: Unknown function: execute
E116: Invalid arguments for function split(execute('sign place file=' . bufname('%')), '\n')
E15: Invalid expression: split(execute('sign place file=' . bufname('%')), '\n')

Broken with coverage 4.0.3

After I updated coverage to 4.0.3, all files are100% covered in the plugin, even the fact is they are not 100% covered.

Error when using this plugin

Hi,

I get the following error when using this plugin

Error detected while processing function <SNR>128_Proxy..<SNR>128_CoveragepyReport..<SNR>128_ReportParse..<SNR>128_LineNumberParse:
line   10:
E727: Start past end
E714: List required
Error detected while processing function <SNR>128_Proxy..<SNR>128_CoveragepyReport..<SNR>128_ReportParse:
line    9:
E706: Variable type mismatch for: all_line_nos

Unable to run plugin

Hi,

I have the latest version of the plugin installed (with vundle) but when I try to run it, I get:

Error detected while processing function <SNR>93_Proxy[10]..<SNR>93_HighlightMissing:
line    8:
E684: list index out of range: 0

What could be the issue, I can't make heads or tails of the error message.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    šŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. šŸ“ŠšŸ“ˆšŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ā¤ļø Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.