@contextlib.contextmanager<EOL>def ensure_removed(obj, attr):
try:<EOL><INDENT>yield<EOL><DEDENT>finally:<EOL><INDENT>try:<EOL><INDENT>delattr(obj, attr)<EOL><DEDENT>except AttributeError:<EOL><INDENT>pass<EOL><DEDENT>obj._accessors.discard(attr)<EOL><DEDENT>
Ensure that an attribute added to 'obj' during the test is
    removed when we're done