I'm not a big fan of how this modifies global state. From a purity perspective, it makes the entire test suite order dependant. Can these be stashed and restored in a before/after (or around) instead? Then they can be cleared without worry inside any tests that requires them to be missing.