Is there a reason why assert_raises wasn't used here?