[issue14819] Add `assertIsSubclass` and `assertNotIsSubclass` to `unittest.TestCase`

R. David Murray report at bugs.python.org
Wed May 16 18:18:25 CEST 2012

R. David Murray <rdmurray at bitdance.com> added the comment:

I agree that testing for subclass is a rather specialized thing, and thus should be defined by a project that needs it.  Normal API-centric unit tests shouldn't, IMO, care whether X is a subclass of Y.  If you are using it to write a failing unit test to "drive" refactoring from one class to another, that is, I think, a very good example of a specialized use case (one I would certainly never use, for example) and you should just put it in your own project test codebase.

nosy: +r.david.murray
status: pending -> open

Python tracker <report at bugs.python.org>

More information about the Python-bugs-list mailing list