alfredodeza / pytest.vim

Runs your UnitTests with py.test displaying red/green bars and errors
275 stars 40 forks source link

Nested functions cause the plugin to fail #18

Closed nicolaiarocci closed 10 years ago

nicolaiarocci commented 10 years ago

Hello and well done on this plugin!

If the test includes a nested function (like this one) the plugin will fail on both method and class. even if the cursor is outside the nested routine (these are unittest functions which py.test discovers and runs without issues).

alfredodeza commented 10 years ago

Nice catch.

The actual problem here is that the commented line is messing up the search for the class definition. You can see that it is using the word really as the class name which is wrong if you look at :Pytest session and see what path is being passed onto py.test.

I should have a fix for this soon (hopefully today)

alfredodeza commented 10 years ago

@nicolaiarocci can you pull and try again? It works for me, would be great if you could confirm the fix before closing :)

nicolaiarocci commented 10 years ago

works wonders! :+1: