def endLog(self): self.__end = datetime.now() self.__duration = self.__end - self.__start UI.log('END LOG', 'End time: ' + str(self.__end).split('.')[0], 'Duration: ' + str(self.__duration)) UI.logTitle(UI.test_result) UI.closeLog() if os.path.exists(self.__log_path + '/PASS - ' + self.__log_name): os.remove(self.__log_path + '/PASS - ' + self.__log_name) if os.path.exists(self.__log_path + '/FAIL - ' + self.__log_name): os.remove(self.__log_path + '/FAIL - ' + self.__log_name) if os.path.exists(self.__log_path + '/CHECK - ' + self.__log_name): os.remove(self.__log_path + '/CHECK - ' + self.__log_name) if os.path.exists(self.__log_path + '/EXCEPTION - ' + self.__log_name): os.remove(self.__log_path + '/EXCEPTION - ' + self.__log_name) shutil.copyfile( self.__log_path + '/' + self.__log_name, self.__log_path + '/' + UI.test_result + ' - ' + self.__log_name)