[TIP] Fwd: Pycon Talks

Nate Lowrie solodex2151 at gmail.com
Mon Mar 5 08:54:03 PST 2007


Again forgot to send it to the list....

---------- Forwarded message ----------
From: Nate Lowrie <solodex2151 at gmail.com>
Date: Mar 5, 2007 9:26 AM
Subject: Re: [TIP] Pycon Talks
To: Pete <pfein at pobox.com>


On 3/6/07, Pete <pfein at pobox.com> wrote:
> On Sunday March 4 2007 6:09 pm, Grig Gheorghiu wrote:
> > --- Michael Foord <fuzzyman at voidspace.org.uk> wrote:
> > My view is that you should mock only when your code depends on external
> > interfaces that generate random results (Web servers, XML-RPC servers,
> > etc.). Generally speaking, at the I/O boundaries of your application,
> > or when you deal with libraries/3rd party code over which you have no
> > control.
> >
> > It's also useful to mock the database layer, for several reasons:
> >
> > 1) speed
> > 2) consistency in getting back the results you need
> > 3) simulating exceptions
> >
> > You can also achieve 1) and 2) with small test databases (in-memory or
> > not). But it's very hard to achieve 3) without mocking.
>
> *THIS* is what I needed to hear at Pycon.
>
> Most of the testing talks assumed too much.

Read the XUnit Patterns website.  It will give you most of the basics.

I wish I could have been at PyCon.  If anyone on the off chance went
to the Dabo session and liked it, I could use some help retrofitting
the framework with unit tests....

Anyway, maybe next year there needs to be an intro to TDD session or a
TDD based sprint.

>
> _______________________________________________
> testing-in-python mailing list
> testing-in-python at lists.idyll.org
> http://lists.idyll.org/listinfo/testing-in-python
>



More information about the testing-in-python mailing list