[issue34596] [unittest] raise error if @skip is used with an argument that looks like a test method

Serhiy Storchaka report at bugs.python.org
Sat Sep 8 08:31:23 EDT 2018


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

It doesn't look like a good design to me if allow a function be a decorator and a decorator fabric at the same time. It always lead to cumbersome and errorprone implementation. Currently there is only one example of such design in the stdlib, other propositions were rejected.

Checking that the argument is a string and raising exception otherwise looks good to me for 3.8. There is no a bug that need to be fixed in maintained versions. If you use unittest.skip() improperly, it is your failure. Helping to catch such mistakes is a new feature.

----------
nosy: +serhiy.storchaka
type: behavior -> enhancement
versions:  -Python 2.7, Python 3.6, Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue34596>
_______________________________________


More information about the Python-bugs-list mailing list