Art of Unit Testing: Part 2

John Roth johnroth at
Mon Aug 27 04:43:02 CEST 2001

"Ng Pheng Siong" <ngps at> wrote in message
news:9m8hg4$o9c$1 at
> According to John Roth <johnroth at>:
> > "Jesse F. W" <jessefw at> wrote in message
> > news:mailman.998679338.16044.python-list at
> > > Should you simulate the parts of the app object that are needed?
> > If your class needs a player object for it to make sense, then you need
> > to supply such an object, properly updated.
> Not always. You might be able to fake it with "mock objects":

As long as it looks like a duck, walks like a duck, and quacks like a duck
it's a duck. It really doesn't matter whether it's the production class or a
testing simulation thereof, except that using the production version is
to inspire greater confidence in the integrity of the testing effort.

John Roth
> --
> Ng Pheng Siong <ngps at> *
> Quidquid latine dictum sit, altum viditur.

More information about the Python-list mailing list