Author flox
Recipients flox, georg.brandl, michael.foord
Date 2011-11-12.12:43:21
SpamBayes Score 0.00287404
Marked as misclassified No
Message-id <>
Sometimes we want to check the exact type of an object.
The method assertIsInstance could be misleading in such case.

The current workaround is:
assertIs(type(obj), some_class)

However we can add an argument to the method to keep the benefit of  having a nice failure message.

  assertIsInstance(stdobj, dict, exact_type=True)
  assertIsInstance(myobj, dict, exact_type=MyDict)
Date User Action Args
2011-11-12 12:43:22floxsetrecipients: + flox, georg.brandl, michael.foord
2011-11-12 12:43:22floxsetmessageid: <>
2011-11-12 12:43:22floxlinkissue13387 messages
2011-11-12 12:43:22floxcreate