Should we be yielding here given that ``assert_error`` returns ``None``? Does ``assert_error`` perhaps need to return something?