[Zope-dev] Test fixture concepts (was: Zope test layers, pytest, and test isolation)

Uli Fouquet uli at gnufix.de
Mon Mar 28 09:33:34 EDT 2011


Hi there,

Benji York wrote:
> On Sun, Mar 27, 2011 at 10:54 AM, Uli Fouquet <uli at gnufix.de> wrote:
> > - `assert` works like you would expect it to work in tests. No need
> >  to use `self.assertEqual()`` and friends (but you can if you prefer).
> 
> How do they deal with the fact that assert statements are dropped when
> Python is run with -O?

I think they don't. You get a warning if you do and, of course, reports
might become useless.

On the other hand you have distributed-testing options (I haven't tried
yet) where you should be able to finetune the enviroments (yes, plural)
nicely in which your tests run.

It is said that distributed testing with py.test allows parallel usage
of several CPUs (if the machine has several CPUs), parallel testing on
remote machines and more. AFAICS you can also run the same tests with
different Python interpreters in parallel. In sum all that might give
better speedups than -O, but -- I haven't tried it yet.

Best regards,

-- 
Uli

-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 189 bytes
Desc: Dies ist ein digital signierter Nachrichtenteil
Url : http://mail.zope.org/pipermail/zope-dev/attachments/20110328/19c51503/attachment.bin 


More information about the Zope-Dev mailing list