alfredodeza / pytest.vim

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

Support to run on save #53

Closed jaesbit closed 6 years ago

jaesbit commented 6 years ago

Could be a nice feature to enable run test when project file saved. And maybe some little box green/red for fail or pass all tests instead resume of all test (optional color box)

alfredodeza commented 6 years ago

There is already support for this with looponfail have you tried that and it doesn't work for your use case?

https://github.com/alfredodeza/pytest.vim/#looponfail

jaesbit commented 6 years ago

Yes, I'm using this feature now, but when all tests are Passed, then not run again.

(And I'm getting some python exceptions on run on save) Exception is like this thread => https://github.com/alfredodeza/pytest.vim/issues/20#issuecomment-334754833

alfredodeza commented 6 years ago

The problem with not stopping this behavior on some condition is that it can get annoying pretty fast. You could set this for your use case with an autocommand without requiring the plugin to support it directly:

:autocmd BufWritePost *.py :Pytest file

Closing this as the plugin supports the initial reported issue. For #20 that needs to get fixed there