homepage

This issue tracker has been migrated to GitHub , and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author Brian.Jones
Recipients Brian.Jones, ezio.melotti, michael.foord, patricksmith
Date 2012年05月16日.12:17:04
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1337170625.09.0.846169799962.issue14819@psf.upfronthosting.co.za>
In-reply-to
Content
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 checks like assertIsSubclass have a lot of value. 
First, if you view your collection of unit tests as pools of change detectors, this type of check is very valuable in order to detect changes in ancestry that result from a refactoring. 
Second, if you use a test-driven style of development, this is a very convenient method to have as your tests and code evolve, because the amount of code you have to write to create a failing test becomes a one-liner. 
As an aside, I *would* like to see the submitted patch provide more detail upon failure. Namely, if X is not a subclass of Y, it would be nice to know what it *is* a subclass of in the resulting output.
History
Date User Action Args
2012年05月16日 12:17:05Brian.Jonessetrecipients: + Brian.Jones, ezio.melotti, michael.foord, patricksmith
2012年05月16日 12:17:05Brian.Jonessetmessageid: <1337170625.09.0.846169799962.issue14819@psf.upfronthosting.co.za>
2012年05月16日 12:17:04Brian.Joneslinkissue14819 messages
2012年05月16日 12:17:04Brian.Jonescreate

AltStyle によって変換されたページ (->オリジナル) /