Open onezeroecho opened 10 months ago
This is the intended behaviour. The summary window will show all tests that it is aware of, it does not filter based on the current directory
@rcarriga I should mention that this behavior also causes duplicates of the same project even when just doing :lcd ../
, which gives me the following in the summary window:
neotest-python
project1
╰╮ test_math.py
╰╮ TestMathFunctions
├─ test_addition
├─ test_subtraction
╰─ test_multiply
neotest-python
├─ project1
Originally I thought discovery = { enabled = false }
would have fixed this, but I understood the parameter wrong.
Do you think there will ever be a setting or toggle that be able to change this default behavior? Or perhaps a command to only explicitly discover tests at a user-inputted path?
NeoVim Version
Output of
nvim --version
:Describe the bug
Using the
:lcd
command in other windows or tabs shows discovered tests in the original summary window.This affects workflows where multiple tabs and windows are used for different projects and the original tab with the summary window starts to get polluted with tests from other project directories.
To Reproduce
neotest-python
adapter to the standardminimal.lua
configuration/tmp/parent/{project1,project2}
directory structure with separate test files underneath theproject1
andproject2
directories:mkdir -p /tmp/parent/project1 cd /tmp/parent/project1 nvim --clean -u /tmp/minimal.lua test_math.py
:tabnew
:lcd ../project2
to move to the other project directoryneotest-python /tmp/parent/project2 ╰─ test_strings.py