neotest-python icon indicating copy to clipboard operation
neotest-python copied to clipboard

Custom test function names are not handled

Open nicos68 opened this issue 1 year ago • 2 comments

I am working on a project for which we have cutomized the python_functions option value (using the pyproject.toml file). In this case neotest-python does not detect the tests.

I tried fiddling with the treesitter query and it does solve the issue.

nicos68 avatar Feb 03 '24 23:02 nicos68

Do you have an existing workaround while this is still being looked at? I don't know how to request a bump for your pr.

alecgerona avatar May 26 '24 12:05 alecgerona

There are two things you can do

  • Since this repo hasn't had any update since my pr, you can just point your plugin manager to my PR branch on my fork, as long as the repo is not updated you won't miss any new feature
  • Modify the treesitter query on your local copy of the plugin's lua code. That's what I have done at work. Personally I still use packer, so the file is located at ~/.local/share/nvim/site/pack/packer/start/neotest-python/lua/neotest-python/base.lua

nicos68 avatar May 27 '24 19:05 nicos68