Improve exception tests

Maybe we should change the way we test exceptions (see #476) to always use a context manger as this way is easier to understand.

def test_it(self):
    self.assertRaises(SomeException, do_something, 42, True)

def test_it_with_context(self):
    with self.assertRaises(SomeException):
        do_something(42, True)

Steps

  • update old tests
  • document this in the readme for new exercises