'If C{assertRaises} is used to create a context manager and an exception
is raised from the body of the C{with} statement then the context
manager\'s C{exception} attribute is set to the exception that was
raised.'

def test_assertRaisesContextExpected(self):

    exception = ValueError('marker')
    with self.assertRaises(ValueError) as context:
        raise exception
    self.assertIs(exception, context.exception)
