[TIP] Fail-fast testing?
Marius Gedminas
marius at gedmin.as
Fri Mar 5 14:02:07 PST 2010
On Fri, Mar 05, 2010 at 11:40:30AM -0500, J. Cliff Dyer wrote:
> Would it be possible to get something like the fail-fast features that
> have been incorporated into django 1.2 included in unittest somehow?
>
> There are two improvements that I think could be generally useful.
>
> http://code.djangoproject.com/changeset/12034 provides a Ctrl-C override
> (using the signals module), which prevents the test runner from dying
> with an exception on Ctrl-C, and instead finishes the current test, and
> returns the results up to that point.
+1
I assume people who will be implementing this will have considered the
case of an infinite loop and will make the second Ctrl-C interrupt the
test instead of waiting, and so I don't really need to bring this point
up?
> http://code.djangoproject.com/changeset/11843 provides a --failfast
> option which exits the test run after the first failure, showing all
> test output up to that point. Both of these are great options to have
> available when working with large test suites.
+1
Both nose and py.test also have this, called -x or --stop.
P.S. Both of my +1 mean "these are Good Things to have in a test runner,
but I wasn't paying attention and so I don't know if unittest/unittest2
is going to become a full-featured test runner". Reading mail backlogs
in reverse date order has certain downsides.
Marius Gedminas
--
EMACS is a good OS. The only thing it lacks is a decent text-editor.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: Digital signature
URL: <http://lists.idyll.org/pipermail/testing-in-python/attachments/20100306/48c17724/attachment.pgp>
More information about the testing-in-python
mailing list