[TIP] TiP BoF feedback & call for help

Alfredo Deza alfredodeza at gmail.com
Mon Mar 14 12:26:19 PDT 2011

On Mon, Mar 14, 2011 at 3:11 PM, Jorge Vargas <jorge.vargas at gmail.com>wrote:

> Hello all,
> First of all although I dont' think there is anything with a different
> opinion I totally loved it.
> It's a shame I missed it last year.
> Second (and I'm sorry if you did this but I got in a little late) I
> thought it will be more like other BoF where people will discuss
> rather than lighting talks. Because I was hoping to get some help to
> find out why our tests are so slow. So here is my lightning talk
> regarding that.
> Hi, I got a problem ( halp! )
> <picture of a sad kitty>
> My tests run slooooooooow
> But I don't know who to blame
> This is django so it's probably it's fault.
> <haters got to hate>
> Or perhaps it's that my boss does not want to let me move them over to
> nose Still stuck on vanilla unittest :(
> Or perhaps it's just a bad setup ? more fixtures around ?
> Or maybe it's some of the crazyness we do to have a standalone package
> that does not require a django project.
> We currently have 501 tests on our model only.
> ALL of them just check our business logic and raise validation errors
> for different problems and such.
> Running under jenkins in a VPS with sqlite and postgres (so 1002 runs)
> it takes anywhere from 20-30minutes to run.
> So who is wrong? me? us? jenkins? django? unittest ? Who to blame ?
> I'll love to run my tests more but 30 minutes feedback is just crazy.

Independently of why they are slow, I would play with py.test and the xdist
plugin that will
allow you to run tests in parallel.

At work, we went from 20 minute test runs to around 5.

Since your tests are "vanilla unittest" you should be able to try out
py.test without issues.

For best results, try to match the number of processes to the number of
cores on your machine.

On our 4 core testing server, the command to run in parallel looks like

    py.test -n 4

It should work out of the box :)

You need to install the following:

pip install pytest
pip install pytest-xdist

In that order. Please post back if you do try it to see how it went!

> Looking forward for Santa Clara !
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20110314/b3ae49e3/attachment.htm>

More information about the testing-in-python mailing list