James Corbett <james.h.corb...@gmail.com> added the comment:

I was careless in my example, it would need to be `cls.skipTest(reason)`. 
However, that really doesn't have anything to do with why it should be a 
`classmethod` instead of an instance method: it's so that you can call 
`skipTest` from `classmethods`, namely `setUpClass` which is called by the 
`unittest` framework. You can currently call `skipTest` from `setUpClass` only 
with something ugly like `cls.skipTest(None, reason)` (i.e. passing `None` for 
the `self` parameter, which works because `self` isn't used).

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue41046>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to