improves behavior of assertRaisesSpecific in the face of non-deteministic functions