def METHOD_NAME(self):
    if self.backname:
        logging.info("Restoring file %s", self.filename)
        shutil.copy2(self.backname, self.filename)
    else:
        try:
            os.remove(self.filename)
        except OSError:
            pass
        else:
            logging.info("Deleting test file %s", self.filename)
    # Reset the module globals
    gui.conf.CONF_GENERAL = None
    gui.conf.CONF_ACQUI = None
    gui.conf.CONF_CALIB = None