Cool. While I agree, I also think the explicit call to _cleanups.push feels good enough. It is just a line and having to call reset allows you to restore the original code earlier if you want (e.g. before afterEach), reducing the mock scope in a way similar to what accomplished in Python by "with mock.patch(...):".