bpo-46411: Remove unnecessary calls to sys.exc_info() in tests (GH-30638)

(cherry picked from commit a287b31bcb065e4122400cb59167340d25480e6d)

Co-authored-by: Irit Katriel <1055913+iritkatriel@users.noreply.github.com>
6 files changed