[TIP] Testify

Marius Gedminas marius at gedmin.as
Sat Oct 30 06:20:06 PDT 2010


On Fri, Oct 29, 2010 at 05:19:09PM -0700, Rhett Garber wrote:
> >
> > The blog post says nose and unittest2 didn't meet your needs, but
> > doesn't say what those needs are.  Also, you didn't mention py.test,
> > have you looked at it at all?
> 
> I may have exaggerated since unittest2 was completely unknown to me
> (or non-existant ?) when testify started in summer of 2009. py.test I
> haven't heard of either.
> I'll have to check that out.

There's also zope.testrunner, which suffers from the Zope stigma, so
almost nobody uses it outside Zope-related projects.  It has one unique
feature you may find interesting: test layers, which provide a way to
have shared setup/teardown that is not tied to package/module/class
hierarchy.

> The primary things missing at the time were easy ways to put tests
> into 'suites' and smarter test running for parallelization. Having
> multiple hierarchies of setup and teardown was important. Also, the
> java based style (junit ?) syntax seemed... old school.

This mostly answers my question, but I don't quite get the bit about
easy ways to put tests into suites.  Are you talking about discovery?

> We spent some amount of time hacking in features to the built-in
> unittest but eventually just gave up and started with a clean slate
> (code-wise, not concept-wise)

> >  Actually, the whole idea of
> > "here's yet another Python testing framework, incompatible with all
> > other Python testing frameworks" makes me sad.
> 
> I hear you. It's fairly easy to transition from unittest to testify,
> but that's not the same thing as compatibility.  However, I think it's
> pretty rare for a project to switch test frameworks or migrate tests
> between projects, so compatibility between frameworks doesn't seem
> that interesting.

But it would be nice to be able to switch test _runners_ and get all
those nice features (different output formats, colorization,
parallelization, test selection) for your existing test suites, no
matter which framework these used.

Seeing new developments on unittest2 makes me think this is actually
achievable, maybe.

> Testify is indeed Yet Another Test Framework, but more ideas is better
> for everyone no ?

Yes.

I got the impression from your original post that this was about "here's
a new test framework, better than all other test frameworks, you should
all switch to it", rather than "here's a new test framework we use, look
at it, maybe you'll find interesting ideas to copy".

Marius Gedminas
-- 
"Linux: the operating system with a CLUE... Command Line User Environment".
(seen in a posting in comp.software.testing)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 198 bytes
Desc: Digital signature
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20101030/6e7bcfae/attachment.pgp>


More information about the testing-in-python mailing list