[Python-ideas] unittest: 0 tests pass means failure of the testsuite

Guido van Rossum guido at python.org
Wed Mar 6 15:59:17 EST 2019

I would just file a bug and add a PR.

On Wed, Mar 6, 2019 at 12:14 PM Matěj Cepl <mcepl at cepl.eu> wrote:

> Hi,
> I am a lead maintainer of Python packages in OpenSUSE and I can
> see the pattern of many packagers adding blindly
>     python setup.py test
> to %check section of our SPEC file. The problem is that if the
> package doesn't use unittest (it actually uses nose, pytest or
> something), it could lead to zero found tests, which pass and
> Python returns exit code 0 (success) even though nothing has been
> tested. It seems from the outside that everything is all right,
> package is being tested on every build, but actually it is lie.
> Would it be possible to change unittest runner, so that when 0
> tests pass, whole test suite would end up failing?
> Thank you for considering this,
> Matěj
> --
> https://matej.ceplovi.cz/blog/, Jabber: mcepl at ceplovi.cz
> GPG Finger: 3C76 A027 CA45 AD70 98B5  BC1D 7920 5802 880B C9D8
> Never ascribe to malice that which is adequately explained by
> stupidity.
>     -- Napoleon Bonaparte (or many other people to whom this
>        quote is ascribed)
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/

--Guido van Rossum (python.org/~guido)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20190306/b13040b3/attachment.html>

More information about the Python-ideas mailing list