'Exception instances should match expected types.'

def test_exception_types(self):

    for (exc_type, params) in self.valid_exceptions.items():
        instance = params['instance']
        for match_type in params['types']:
            self.failUnless(isinstance(instance, match_type), msg=('instance:    %(instance)r,    match_type:    %(match_type)s' % vars()))
