Open sho-87 opened 3 months ago
I'm facing a similar issue now. I managed to trace it back to the filetype detection in the 'plenary/filetype.lua' file. It seems that Plenary's filetype_table was not populated for some reason. The snippet below fixes the issue for Python.
in plenary/filetype.lua:8
local filetype_table = {
extension = { py = "python" },
file_name = {},
shebang = {},
}
Error
I get the following error in neotest.log whenever I try to run a single test file or a directory of tests:
all errors in the log file are the same as above, apart from 2 instances of this:
Details
nvim --version:
The project is managed using Poetry and has the following structure. Running
poetry run pytest
outside of nvim runs fine:Im using lazyvim and have installed neotest using the extras package, but I have also tested this manually with this config:
all of my venvs are in the default poetry directory (rather than in separate project directories). I activate the relevant venv using venv-selector
it seems that test discovery works fine as the summary window shows them all correctly, just nothing happens (apart from the logged error) when I run
require("neotest").run.run(vim.fn.expand("%"))
given how often treesitter appears in the log, I also tried recompiling the grammar for python but that didn't fix the problem