neotest-python
neotest-python copied to clipboard
Extract python_functions & use it in treesitter query
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.