testing-cabal/testtools — pull request #34 by djipko (2013-03-26 00:34:26+00:00)
Title: Fix assertRaises when the exception has a metaclass

Due to not taking into account that the type of the class can be a
subclass of type (which is the case when using metaclasses),
assertRaises would report a false positive in case an exception that was
expected had a custom metaclass.

This patch introduces a more robust checking if a given object is a
class or an instance of one, and adds a test case, to make sure
exceptions with custom metaclasses don't break assertRaises.