nvim-neotest / nvim-neotest/neotest-python
ENOENT: no such file or directory on win10 platform
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 192
- Forks
- 60
- PR merge metrics
- No merged PRs in 30d
Description
Neovim v0.11.0 on windows 10 platform.
"No test found" after running Neotest run. When I tried lua neotest.run.run(), or lua neotest.run.run(vim.fn.getcwd()), error occured.
E5108: Error executing lua [string ":lua"]:1: attempt to index global 'neotest' (a nil value)
stack traceback:
[string ":lua"]:1: in main chunk
Then I try: Neotest summary it shows a blank window, and tests showed if I switch buffer to {project_root}\tests\unit\test_date.py. Where the ${project_root} is also my cwd. After hitting "r" key, red cross showed but no further information.
The neotest.log file is blank within the whole above process under the config below :
{
"nvim-neotest/neotest",
dependencies = {
"nvim-neotest/nvim-nio",
"nvim-lua/plenary.nvim",
"antoinemadec/FixCursorHold.nvim",
"nvim-treesitter/nvim-treesitter",
"nvim-neotest/neotest-python",
},
config = function()
require("neotest").setup({
adapters = {
require("neotest-python")({
dap = { justMyCode = false },
runner = "pytest",
}),
},
})
end,
}
if I remove the runner = "pytest", The neotest.log file shows:
ERROR | 2025-05-13T10:19:08Z+0800 | ...Local/nvim-data/lazy/neotest/lua/neotest/client/init.lua:309 | Couldn't find positions in path C:\yss\coding\python\barra_client\tests\unit\test_date.py .../nvim-data/lazy/neotest/lua/neotest/lib/process/init.lua:41: ENOENT: no such file or directory
stack traceback:
[C]: in function 'error'
.../nvim-data/lazy/neotest/lua/neotest/lib/process/init.lua:41: in function 'run'
...vim-data/lazy/neotest-python/lua/neotest-python/base.lua:17: in function 'module_exists'
...vim-data/lazy/neotest-python/lua/neotest-python/base.lua:155: in function 'get_runner'
...-data/lazy/neotest-python/lua/neotest-python/adapter.lua:65: in function 'discover_positions'
...Local/nvim-data/lazy/neotest/lua/neotest/client/init.lua:300: in function <...Local/nvim-data/lazy/neotest/lua/neotest/client/init.lua:264>
[C]: in function 'xpcall'
...Local/nvim-data/lazy/neotest/lua/neotest/client/init.lua:264: in function '_update_positions'
...Local/nvim-data/lazy/neotest/lua/neotest/client/init.lua:317: in function <...Local/nvim-data/lazy/neotest/lua/neotest/client/init.lua:315>
ERROR | 2025-05-13T10:19:08Z+0800 | ...Local/nvim-data/lazy/neotest/lua/neotest/client/init.lua:309 | Couldn't find positions in path C:\yss\coding\python\barra_client\tests\unit\test_date.py .../nvim-data/lazy/neotest/lua/neotest/lib/process/init.lua:41: ENOENT: no such file or directory
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Reproduce the Windows 10 configuration and inspect the ENOENT path through neotest-python/lua/neotest-python/base.lua, adapter.lua, and neotest/lua/neotest/lib/process/init.lua. Start with the logged failure during position discovery; done means the test file is discovered and can run without the ENOENT error.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, neovim, python
- Domain
- devtools, operating-systems, testing-qa
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100