nvim-neotest / neotest-python

MIT License
115 stars 34 forks source link

Extract python_functions & use it in treesitter query #66

Open nicos68 opened 5 months ago

nicos68 commented 5 months ago

This PR aims to resolve #65 : discover pytest test positions when python_functions is set to a value different to test.

I placed the python_functions value extraction code in the discover_positions. This is not ideal because it causes this code to be called once for each test file while calling it only once is enough, but I did not find any satisfying place. Please do not hesitate to suggest improvements on this issue if you see any.

Also it might not be very idiomatic as this is my first time writing lua code in a non-personal project.