alfredodeza / pytest.vim

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

Add a "project" argument to Pytest.vim #14

Closed bstinsonmhk closed 10 years ago

bstinsonmhk commented 10 years ago

This runs tests for the entire project. It does this by starting in the current directory and walking up to '/' looking for a directory called 'tests' or a file called 'tests.py'. If it finds either of these, run py.test otherwise error out letting the user know that there are no tests defined for the project tree. There is a helper argument 'showprojecttests' 'projecttestwd' which shows where in the directory tree we will run py.test

alfredodeza commented 10 years ago

woah, this looks very interesting, will take me a bit to read it through before I merge. Thank you for taking the time to put this together!

bstinsonmhk commented 10 years ago

Awesome! I'll definitely check that out and perhaps send another patch. I picked up the expand(...) idiom writing some things for vim 6 so it definitely looks like time for me to revisit this for some of my other plugins too :)

bstinsonmhk commented 10 years ago

This implementation with finddir() works for my purposes. I can see extending this in the future to allow for user-defined testdirs and testfiles to search for.

alfredodeza commented 10 years ago

This looks almost good to go, a couple of final (I think) observations: