[TIP] Dingus screencast and source code

Marius Gedminas marius at gedmin.as
Wed Apr 1 23:52:17 PDT 2009


On Wed, Apr 01, 2009 at 10:31:13PM -0400, Gary Bernhardt wrote:
> On Wed, Apr 1, 2009 at 12:57 PM, Marius Gedminas <marius at gedmin.as> wrote:
> > What do you use to integrate nose with vim?
> 
> There are a few of pieces:
>   * The nose_machineout plugin makes nose output errors in a way
> that's roughly compatible with make's output.
>   * Vim's :make command knows how to parse make output. This is how it
> jumps me to the correct line.

How well does this work with medium and large testsuites?  The reason I
don't use :make myself is that it blocks the whole vim process while the
testsuite runs, and if that's not instant, it quickly becomes
irritating.

The nice thing about your Dingus screencast was that the tests gave the
result instantly -- but then when you have 5 unit tests with trivial
setup, that's often the case.  How well does this scale in practices, to
test suites with thousands of tests?

At some point in a large project just importing all the code and test
modules tends to take a couple of seconds.  Do you limit the tests you
run at any particular time while developing to a single test module?
(Okay, looking at your .vimrc, I see that you do.)

The other interesting question is a consequence of using mocking
heavily.  When you do that, you really need integration tests (or
mistakes about API will get replicated in your code and in your
(passing) tests, but the code won't work in real life).  How do you
write and organize those?

>   * Vim provides a list of compile errors via getqflist(), which I use
> to get at the error text.
>
> Combine all of that with "set switchbuf=useopen" and vim will
> automatically jump your cursor to the erroring line, even across
> splits. All of this is available in my .vimrc [1] on BitBucket. Find
> the <leader>m remap (and the ones below it) and go from there. I am
> definitely not a very advanced vim scripter, so please forgive any
> syntactic badness in my vimrc. :)
> 
> [1] https://bitbucket.org/garybernhardt/dotfiles/src/tip/.vimrc

Aieee, set tabstop=4 is an abomination! ;-)

Well, at least you have set expandtab.

Marius Gedminas
-- 
Experience varies directly with equipment ruined.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Digital signature
Url : http://lists.idyll.org/pipermail/testing-in-python/attachments/20090402/ed9f3800/attachment.pgp 


More information about the testing-in-python mailing list