DEV: Don't leak pretender handlers between tests (PR #11050)

description tbd

GitHub

shall we close this or merge this?

@CvX shall we close this or merge this?

Sorry, missed the previous comment. This stuff still should be done, but not in the current form. Closing.