Using `np.testing.assert_raises` should be put in a try block, since it requires nose, which is one of our soft prerequisites for GalSim.  Grep assert_raises to see how this is handled in other test scripts.