[TIP] Test discovery for unittest

Robert Collins robertc at robertcollins.net
Tue Apr 7 14:00:49 PDT 2009


On Tue, 2009-04-07 at 18:10 +0300, Marius Gedminas wrote:

> testresources is a name I hadn't heard before, and I'll certainly
> investigate at it.  However, looking at the various solutions out there
> requires time that the Zope people usually don't have...

Indeed :). Its been on my list to 'replace layers with testresources' in
our launchpad tests for about 3 years now. Tuits are hard to find. I
know its in other peoples tuits too...

> One of the things Zope relies on is that layer tearDown can raise
> NotImplementedError, in which case the test runner will for and run the
> next layer's tests in a fresh process.  (Yes, Zope uses rather more of
> global state than is healthy, or at least used to, and is now too
> conservative to just assume layer tearDown can clean everything up.)
> This is esoteric enough that I don't expect to find it anywhere else
> (well, maybe subunit ;), without adding that those layers can stack.

So yes, I'd expect subunit to be a good way to isolate things; in fact,
I'd probably just isolate all the tests for a given set of resources to
a single process, its arguably cleaner and definitely simpler.

-Rob
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: This is a digitally signed message part
Url : http://lists.idyll.org/pipermail/testing-in-python/attachments/20090408/53c70d5b/attachment.pgp 


More information about the testing-in-python mailing list