sponsor Vim development Vim logo Vim Book Ad

pytest.vim : Runs your (Python) tests with py.test displaying red/green bars

 script karma  Rating 15/8, Downloaded by 3284  Comments, bugs, improvements  Vim wiki

created by
Alfredo Deza
 
script type
utility
 
description
A simple way of running your tests (with py.test) from within VIM.

Talking with Holger Krekel (original author of py.test and vim user) we thought
it would be neat to be able to call it from vim and get some immediate results.

This is especially useful when you are tweaking and do not want to be moving
around between the terminal and your vim session.

Screencast: http://vimeo.com/19774046


Screenshots:

Failing Tests
http://www.flickr.com/photos/aldegaz/5414279071

Passing Tests
http://www.flickr.com/photos/aldegaz/5395135539

Verbose Mode
http://www.flickr.com/photos/aldegaz/5414279043


For the latest documentation and project info go to
the project home:
https://github.com/alfredodeza/pytest.vim
 
install details
Either drop the plugin/pytest.vim file into your plugin directory or use Pathogen and drop the whole packaged directory in your bundle dir.
 

rate this script Life Changing Helpful Unfulfilling 
script versions (upload new version)

Click on the package to download.

package script version date Vim version user release notes
pytest.tar.gz 1.1.4 2012-06-22 7.0 Alfredo Deza * better output when tests are passing (inside the green bar).
* improved handling of py.test errors
* fixes a small looponfail problem where an autocommand would stick for other buffers
* jump to previous window when a test is run is more robust
* better error output (whole AssertionErrror line) when going through errors
pytest.tar.gz 1.1.1 2012-04-01 7.3 Alfredo Deza Bug fixes with autocommands and better awareness of nested Python objects.
pytest.tar.gz 1.0.0 2011-07-19 7.0 Alfredo Deza * Mayor release for plugin with important internal updates.
* Adds `looponfail` for test, methods or classes
* Adds `clear` command to clear a looponfail call
* Add support for function tests
* Better information when there is a py.test error or INTERNALERROR
* Add carrousel for moving around in the failed/error buffer list
pytest.tar.gz 0.6.1 2011-05-06 7.0 Alfredo Deza Adds support to use Conque.vim (better shell experience) if it is installed. Drops back to normal dumb terminal if it doesn't.
This changes the behavior for all pdb flags and the verbose mode.
pytest.tar.gz 0.6.0 2011-04-19 7.0 Alfredo Deza Adds the possibility to drop to a PDB session when a test fails or when a pdb is arbitrarily set.
pytest.tar.gz 0.0.5 2011-02-10 7.0 Alfredo Deza Adds Syntax Highlighting for saved py.test sessions.
You can now edit other files with errors in split buffers.
Separate error and exception buffers for better readability.
Better error handling and parsing.
pytest.tar.gz 0.4 2011-02-04 7.0 Alfredo Deza A *ton* of changes:

* Adds buffers for last failed errors and full py.test output for last session
* Adds syntax highlighting for py.test session and failed buffers
* Makes the above buffers toggable
* You can now jump to errors! In split buffers! OMG!
* You can CIRCLE around the next, previous, last or first errors in the same split buffer!
* You can go the "end" file where the error ended (if it is not your current file).
pytest.tar.gz 0.3 2011-01-29 7.0 Alfredo Deza Adds support for native py.test errors and provides error messages when the plugin can't match the class or method you are requesting for testing.
pytest.tar.gz 0.2 2011-01-29 7.0 Alfredo Deza Getts better information output when tests are failing (Line:  1    ==>> AssertionError) and it introduces a "verbose" mode where you can see full results in a split window
pytest.tar.gz 0.1 2011-01-28 7.0 Alfredo Deza Initial upload
ip used for rating: 3.15.219.64

If you have questions or remarks about this site, visit the vimonline development pages. Please use this site responsibly.
Questions about Vim should go to the maillist. Help Bram help Uganda.
   
Vim at Github