[issue14534] Add method to mark unittest.TestCases as "do not run".

Ezio Melotti report at bugs.python.org
Thu Jun 19 22:41:13 CEST 2014


Ezio Melotti added the comment:

+1 on the idea.

While the mixin method works and it's not overly complex, it might not be immediately obvious to those unfamiliar with it and to those reviewing the code (i.e. there's no clear hint about the reason why the base class doesn't inherit from TestCase directly).  Using mixins also adds duplication and might results in tests not being run if one adds a new class and forgets to add TestCase in the mix.

A decorator would solve these problems nicely, and a bit of magic under the hood seems to me an acceptable price to pay.

----------
nosy: +ezio.melotti

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue14534>
_______________________________________


More information about the Python-bugs-list mailing list