[TIP] The test suite that was too dangerous to live

Ben Finney ben+python at benfinney.id.au
Fri Mar 9 20:18:19 PST 2012


Ben Finney <ben+python at benfinney.id.au> writes:

> Today I had a chilling realisation:
>
> I no longer trust my tests.

Thanks to everyone who responded with good advice. It is still
percolating in my mind, and I haven't applied these thoughts to the
suite that was giving me such trouble.

But I wanted to say that you have done me some good, and my newer code
has test suites that are more easily maintained.

I was reminded of this thread when watching Gary Bernhardt's talk
<URL:http://us.pycon.org/2011/schedule/presentations/172/> at Pycon
2011, “Units Need Tests Too” (video at <URL:http://pycon.tv/video/70/>).

Gary is a stickler for many of the principles I adhere to about tests,
which made me more receptive to his practical advice to *not* test some
things.

I hope this can help someone in a similar situation in future,
preferably before their test suite becomes a monster.

-- 
 \        “I'd take the awe of understanding over the awe of ignorance |
  `\                                          any day.” —Douglas Adams |
_o__)                                                                  |
Ben Finney




More information about the testing-in-python mailing list