gh-111159: Fix `doctest` output comparison for exceptions with notes (#111160)

3 files changed