The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 19: | Line 19: | ||
</pre> |
</pre> |
||
− | will set the < |
+ | will set the <tt>'errorformat'</tt> option for PyUnit, enabling Vim to parse a <tt>unittest</tt> test runner's output and to enter quickfix mode. |
− | To run all your unit tests at once, using Vim's < |
+ | To run all your unit tests at once, using Vim's <tt>:make</tt> command, you'll need to set the <tt>'makeprg'</tt> option and provide a test runner. This is often done using an <tt>alltests.py</tt> script. |
<pre> |
<pre> |
||
:setlocal makeprg=./alltests.py |
:setlocal makeprg=./alltests.py |
||
</pre> |
</pre> |
||
− | Here is an example < |
+ | Here is an example <tt>alltests.py</tt>: |
<pre> |
<pre> |
||
#!/usr/bin/env python2 |
#!/usr/bin/env python2 |
||
Line 49: | Line 49: | ||
</pre> |
</pre> |
||
− | Here is an alternative < |
+ | Here is an alternative <tt>alltests.py</tt>: |
<pre> |
<pre> |
||
#!/usr/bin/env python |
#!/usr/bin/env python |
||
Line 104: | Line 104: | ||
</pre> |
</pre> |
||
− | To have Vim automatically use these settings for all Python files, add the following to < |
+ | To have Vim automatically use these settings for all Python files, add the following to <tt>~/.vim/after/ftplugin/python.vim</tt> (<tt>$HOME\vimfiles\after\ftplugin\python.vim</tt> on Windows) |
<pre> |
<pre> |