nvim-neotest / neotest-python

MIT License
115 stars 34 forks source link

Error panel sometimes replaces whole buffer? #47

Open johnbayne opened 1 year ago

johnbayne commented 1 year ago

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:

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. :)