nvim-neotest / nvim-neotest/neotest-python
Path containing forward slash won't be splited on Windows when matching the file
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 192
- Forks
- 60
- PR merge metrics
- No merged PRs in 30d
Description
I'm on Windows, and the following problem doesn't occur on Ubuntu(wsl)
When I run tests in test_add.py or toggle tests summary, it shows that no tests found.
I've looked through the source code and modified base.lua in neotest-python
Then I run tests again and got the following output:
It seems that the adapter splits the file path by \, but my file path contains only /
Then I modified the source code, changing this line
local elems = vim.split(file_path, Path.path.sep)
into
local elems = vim.split(file_path, "/")
Then tests summary shows all the tests correctly.
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
Start in base.lua at the path-splitting logic using Path.path.sep, and compare it with the path format reported on Windows. Reproduce the issue with test_add.py or the tests summary, then verify that files using forward slashes are matched and their tests are discovered correctly.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- lua, neovim, python
- Domain
- testing, tooling
- Issue type
- Bug
- Difficulty
- 2/5
- Estimated time
- 1-3 hours
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100