[#943] Don't use `with assert_raises`

It doesn't work in Python 2.6