Giter VIP home page Giter VIP logo

Comments (19)

rcarriga avatar rcarriga commented on July 19, 2024

Can you provide the file that the output is being read from? I can try reproduce with that

from neotest.

rcarriga avatar rcarriga commented on July 19, 2024

Is this still an issue?

from neotest.

sidlatau avatar sidlatau commented on July 19, 2024

Sorry, did not manage to prepare a minimum working example, so not sure if this is a problem in my config or in the plugin.
I am still have cropped text when I scroll output popup, if popup is opened directly from test file:
image
image

But if I open output popup from test summary, I get full content:
image

If you can not reproduce an issue, feel free to close it, I have a workaround (just open output from the summary), if I will find more info about a problem I can reopen it or register a new one.

from neotest.

rcarriga avatar rcarriga commented on July 19, 2024

I might be able to reproduce if you can provide the output file being read. It's the path in neotest.Result.output

from neotest.

rouge8 avatar rouge8 commented on July 19, 2024

I'm having the same issue, can you explain how to find the path in neotest.Result.output?

from neotest.

rcarriga avatar rcarriga commented on July 19, 2024

Sorry that comment was directed at someone who knows the internals of neotest , hence the lack of instruction 😅 You can get it with a custom consumer:

neotest.setup({
  consumers = {
    print_output_path = function(client)
      client.listeners.results = vim.schedule_wrap(function(adapter_id, results)
        print(vim.inspect(results))
      end)
    end,
  },
...

I'd suggest just running a single test, that'll print out a lot of info if you run it on a suite.

Also note that the files are deleted when NeoVim exits, so you have to keep it open.

from neotest.

rouge8 avatar rouge8 commented on July 19, 2024

Here's an output file from running a single test:

�[1m================================================= test session starts ==================================================�[0m
platform darwin -- Python 3.10.5, pytest-7.1.2, pluggy-1.0.0
Using --randomly-seed=731529649
rootdir: /Users/andy/Dropbox/Projects/wanikani-burnt-kanji-to-anki, configfile: pyproject.toml
plugins: anyio-3.6.1, Faker-13.15.0, randomly-3.12.0, mock-3.8.2, cov-3.0.0, httpx-0.21.0
�[1mcollecting ... �[0m�[1m
collected 1 item                                                                                                       �[0m

tests/test_wanikani.py �[32m.�[0m�[32m                                                                                         [100%]�[0m

�[32m================================================== �[32m�[1m1 passed�[0m�[32m in 0.04s�[0m�[32m ===================================================�[0m

The floating window cuts it off like so:

================================================= test session starts
platform darwin -- Python 3.10.5, pytest-7.1.2, pluggy-1.0.0
Using --randomly-seed=731529649
rootdir: /Users/andy/Dropbox/Projects/wanikani-burnt-kanji-to-anki, co
plugins: anyio-3.6.1, Faker-13.15.0, randomly-3.12.0, mock-3.8.2, cov-
collected 1 item

tests/test_wanikani.py .

================================================== 1 passed in 0.04s =

from neotest.

rcarriga avatar rcarriga commented on July 19, 2024

I'll need the binary data, copy/pasting into GitHub changes the contents unfortunately

from neotest.

rouge8 avatar rouge8 commented on July 19, 2024

7.zip

This should work then

from neotest.

rcarriga avatar rcarriga commented on July 19, 2024

Thanks! I can't reproduce with it however. My first thought is that it could be a NeoVim terminal bug. What version of NeoVim are you using?

from neotest.

rouge8 avatar rouge8 commented on July 19, 2024

I’m running 0.7.2

from neotest.

rcarriga avatar rcarriga commented on July 19, 2024

Just to update here, I've tried running on 0.7.2 but still can't reproduce unfortunately. Not sure if there's much more that I can do, especially as it looks like a Neovim core bug. You could try testing with nightly to see if that works? Or perhaps a different install method (app image vs build from source etc)

from neotest.

rouge8 avatar rouge8 commented on July 19, 2024

Hmm, I see the same cutting off behavior on the latest nightly nvim:

NVIM v0.8.0-dev-762-g0a049c322
Build type: RelWithDebInfo
LuaJIT 2.1.0-beta3

from neotest.

rcarriga avatar rcarriga commented on July 19, 2024

OK I finally encountered this and figured out it's because of how NeoVim internally decides to truncate terminal lines. I've implemented a workaround so this should no longer happen

from neotest.

rouge8 avatar rouge8 commented on July 19, 2024

Hmm, I'm still seeing the same cutting off behavior on a3229e9.

NVIM v0.7.2
Build type: Release
LuaJIT 2.1.0-beta3
Compiled by [email protected]

from neotest.

rcarriga avatar rcarriga commented on July 19, 2024

I hadn't fixed it for attaching, can you confirm if you still have the issue with opening output of an already completed test?

from neotest.

rouge8 avatar rouge8 commented on July 19, 2024

On 2a887fe, I run the test, call neotest.output.open, and it's still cut off. 😞 Tested on 0.7.2 and v0.8.0-dev-1020-gea10e0c10...

from neotest.

rcarriga avatar rcarriga commented on July 19, 2024

Yeah I'm a bit stumped here, as far I can tell there's something weird going on in Neovim core with the terminal and I've no idea if it can be worked around. It seems like both of you are on MacOS so maybe it's something to do with that? Since I can't reproduce, I can't raise an issue in Neovim that would be of any use but if you want you can try to reproduce by separating out the output code in https://github.com/nvim-neotest/neotest/blob/master/lua/neotest/consumers/output.lua. It's pretty simple (just has a bit of fluff around handling custom open functions and closing) so it should be relatively simple to make it work with reading a file like the one you supplied

from neotest.

sidlatau avatar sidlatau commented on July 19, 2024

I am unable to reproduce this issue for a while, so closing it.

from neotest.

Related Issues (20)

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.