alfredodeza / pytest.vim

Runs your UnitTests with py.test displaying red/green bars and errors
274 stars 40 forks source link

broken on Neovim #47

Closed alok closed 7 years ago

alok commented 7 years ago

I think you have to modify some function calls as specified here.

alok commented 7 years ago

More specifically, running :Pytest file gives this error: E120: Using <SID> not in a script context: s:HandleOutput.

alfredodeza commented 7 years ago

I couldn't reproduce with the NeoVim version I had. Do you know what version are you using where this is a problem?

alok commented 7 years ago

I'm using the latest build from git.

alfredodeza commented 7 years ago

@Alok and what version is that?

This is problematic for the plugin because it is a backwards incompatible change within the same major release.

I'm considering dropping a continuous support for NeoVim if this keeps up.

alfredodeza commented 7 years ago

The current version I am trying that works is 0.1.4, for a backwards incompatible change I am unsure how could I go around supporting both ways

alok commented 7 years ago

NVIM v0.2.0-211-g9009c20

alfredodeza commented 7 years ago

I will leave this issue open, but will not fix it anytime soon since this requires to support a development version that would break whoever is using the stable one(s)

alfredodeza commented 7 years ago

I am really struggling making this work. This used to rely on the fact that I could pass tempfile which is where the stdout lived:

  let s:id = jobstart(s:cmdline, {
        \ 'tempfile':  tempfile,
        \ 'on_exit':   's:HandleOutput' })

But with the new way I can't, or I am failing to find a way to pass the location of tempfile as an argument to HandleOutput.

If anyone can help propose something I would be happy to review

alfredodeza commented 7 years ago

I think this https://github.com/alfredodeza/pytest.vim/commit/455889dcd4a69cfced3526cd838fa66636d3585c fixes it. Can you guys test it please so I can merge this?

/cc @Alok @decko

alfredodeza commented 7 years ago

@Alok @decko ping?

kmarius commented 7 years ago

https://github.com/alfredodeza/pytest.vim/commit/455889dcd4a69cfced3526cd838fa66636d3585c fixed the problem for me using nvim v0.2.0 (release version).

alfredodeza commented 7 years ago

Merged 88624df7f8f22f31dd54676d7f94e94696fed177 to master. Thanks for being so patient! :)