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

2012-05-16 Thread R. David Murray
Changes by R. David Murray : -- status: open -> closed ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://m

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

2012-05-16 Thread R. David Murray
R. David Murray 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 "dr

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

2012-05-16 Thread Ezio Melotti
Ezio Melotti added the comment: I couldn't find any pointer to the discussion (maybe it happened on IRC), but the general goal is to provide only the most used/important assert methods and avoid bloating the API with less common ones. -- status: open -> pending __

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

2012-05-16 Thread Brian Jones
Brian Jones added the comment: I can't find a previous discussion of this topic. If you know the list it happened on, or the bug#, let me know as I'd be curious to see the discussion. While I could concede that checking type is arguably a more common case than checking ancestry, I think that

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

2012-05-15 Thread Ezio Melotti
Ezio Melotti added the comment: Hi, this has been discussed already, and we took the decision to leave these out, since checking for subclasses is not as common as checking the type. If needed, this could still be implemented by the user, and possibly they could be added as recipes to the unit

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

2012-05-15 Thread Patrick Smith
New submission from Patrick Smith : The attached patch adds two helper methods to `unittest.TestCase`: `assertIsSubclass` and `assertIsNotSubclass`. These methods are similar to the `assertIsInstance` and `assertIsNotInstance` methods that are already part of `unittest.TestCase`. They allow on