[Python-Dev] Using more specific methods in Python unit tests

Mark Dickinson dickinsm at gmail.com
Sun Feb 16 12:40:37 CET 2014

On Sun, Feb 16, 2014 at 12:22 AM, Nick Coghlan <ncoghlan at gmail.com> wrote:

> The practical benefits of this kind of change in the test suite are
> also highly dubious, because they *only help if the test fails at some
> point in the future*. At that point, whoever caused the test to fail
> will switch into debugging mode, and a couple of relevant points
> apply:

One place where those points don't apply so cleanly is when the test
failure is coming from continuous integration and can't easily be
reproduced locally (e.g., because there's a problem on a platform you don't
have access to, or because it's some kind of threading-related intermittent
failure that's exacerbated by the timing conditions on a particular
machine).  In those situations, an informative error message can easily
save significant debugging time.

Count me as +1 on the test updates, provided they're done carefully.  (And
all those I've looked at from Serhiy do indeed look careful.)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20140216/bf42374b/attachment.html>

More information about the Python-Dev mailing list