class Class(object):

    def should_raise(self):
        raise ValueError('expected arg')


class test_Class(unittest.TestCase):

    def test_something(self):
        DUT = Class()
with self.assertRaises(ValueError) as exception_context_manager:
    DUT.should_raise()
exception = exception_context_manager.exception
self.assertEqual(exception.args, ('expected arg',))
Using a context manager with Python assertRaises