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

Error panel sometimes replaces whole buffer? #47

Open
johnbayne opened this issue Apr 7, 2023 · 0 comments
Open

Error panel sometimes replaces whole buffer? #47

johnbayne opened this issue Apr 7, 2023 · 0 comments

Comments

@johnbayne
Copy link

I just set up neotest-python after using neotest-rspec without issue.

If I run tests that return an error, about half the time neotest creates a new window at the bottom of the screen and shows the error there correctly. The other half, it'll take over the primary window, show the error there, and shrink the buffer to the height of the error panel.

Perhaps best explained by screen capture. (In video, test works as expected the first time, error occurs 2nd time)

Screen Capture of Issue

A few notes:

  • This doesn't happen in neotest-rspec

  • As mentioned, it happens intermittently (~50% of the time) in neotest-python

  • If no errors are returned, the issue doesn't occur

  • If I have the summary panel open, the error shows up in the summary panel instead of the main buffer

  • Command is triggered by lua require('neotest').run.run() or derivatives (eg: lua require('neotest').run.run(vim.fn.expand('%')))
    `

  • No issues running pytest outside vim

  • My configuration for neotest-python is bare bones. Specifically:

local status_ok, neotest = pcall(require, "neotest")
if not status_ok then
  print("Neotest could not be loaded")
  return
end

local status_ok, neotest_python = pcall(require, "neotest-python")
if not status_ok then
  print("Neotest-python could not be loaded")
  return
end

local status_ok, neotest_rspec= pcall(require, "neotest-rspec")
if not status_ok then
  print("Neotest-rspec could not be loaded")
  return
end

neotest.setup({
  adapters =  {
    neotest_rspec({
      rspec_cmd = function()
        return vim.tbl_flatten({
          "bundle",
          "exec",
          "rspec"
        })
      end
    }),
    neotest_python,
  }
})

Any thoughts appreciated, and thanks for neotest - loving it. :)

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

1 participant