Author flox
Recipients eric.araujo, ezio.melotti, flox, georg.brandl, michael.foord, rhettinger
Date 2011-11-12.15:25:40
SpamBayes Score 5.37187e-05
Marked as misclassified No
Message-id <>
I would say that this one is clear too:
  aelf.assertTrue(isinstance(obj, cls))

except that the failure message is not very friendly:
  AssertionError: False is not true

If we keep assertIsInstance, more people will continue to misuse it just because the method exist, when they really want to check (type(obj) is cls).

An option could be to add a snippet to the documentation of `assertIsInstance` stating that the right way to check exact type is `assertIs(type(obj), cls)`.
Date User Action Args
2011-11-12 15:25:41floxsetrecipients: + flox, georg.brandl, rhettinger, ezio.melotti, eric.araujo, michael.foord
2011-11-12 15:25:41floxsetmessageid: <>
2011-11-12 15:25:40floxlinkissue13387 messages
2011-11-12 15:25:40floxcreate