wsdjeg / vim-fetch

Make Vim handle line and column numbers in file names with a minimum of fuss
http://www.vim.org/scripts/script.php?script_id=5089
MIT License
312 stars 17 forks source link

pytest: support for node ids in general #15

Open blueyed opened 6 years ago

blueyed commented 6 years ago

Currently only ::method is matched, but there is also ::Class::method, and e.g. test_pytest_param_example.py::test_eval[1+7-8].

As for matching the ::Class I think using the normal command / instead of search() might work - using two patterns (/^\s*class Class;/\s*def method). Currently s:setpos only supports calling a function though - are you up for changing this? (I do not think that we can assume execute() to be available) Would an internal method wrapping :normal make sense - maybe using execute() if it is available?

As for the parametrized suffix: this should get matched, but ignored - it all goes to the same method.