Looks fine, but I'm not sure having special logic for the case where new is uninited and value is uninited makes sense. That doesn't seem like something a test author would do deliberately, except perhaps if they were later in the test setting the attribute to something and wanted the cleanup at the end, in which case the value would leak through in this case.
Looks fine, but I'm not sure having special logic for the case where new is uninited and value is uninited makes sense. That doesn't seem like something a test author would do deliberately, except perhaps if they were later in the test setting the attribute to something and wanted the cleanup at the end, in which case the value would leak through in this case.