bugInfo['IntegrationTest'] = bugInfo.apply(lambda x: self.bug_rule(x, "IntegrationTest"), axis = 1) def bug_rule(self, frame, type): # 處理列表中的數據,更新到sql數據庫中 result = "0" if type == "SmokeTest": # 冒煙測試 if re.search("^\[冒煙\]|\[冒煙測試\]|【冒煙】|【冒煙測試】", frame["title"]): result = "1" elif type == "InterfaceTest": # 接口測試 if re.search("^\[接口\]|\[接口測試\]|【接口】|【接口測試】", frame["title"]): result = "1" elif type == "IntegrationTest": # 集成測試 if self.IntegrationTime != "" and self.IntegrationTime == frame["created_time"]: result = "1" return result