def setUpClass(self): self.runmethodhandle = RunMain.RunMethod() self.disposeapihandle = DisposeApi.DisposeApi(case_name) self.disposeheaderhandle = DisposeHeader.DisposeHeader() self.disposecasehandle = DisposeCase.DisposeCase(case_name) self.disposereporthandle = DisposeReport.DisposeReport(case_name) self.disposerelyhandle = DisposeRely.DisposeRely() self.disposeasserthandle = DisposeAssert.DisposeAssert() self.disposeenvhandle = DisposeEnv.DisposeEnv()
def setUpClass(self): self.runmethodhandle = RunMain.RunMethod() self.disposeapihandle = DisposeApi.DisposeApi(case_name) self.disposeheaderhandle = DisposeHeader.DisposeHeader() self.disposecasehandle = DisposeCase.DisposeCase(case_name) self.disposereporthandle = DisposeReport.DisposeReport(case_name) self.disposerelyhandle = DisposeRely.DisposeRely() self.readdbhandle = ReadDB.ReadDB() self.readtxthandle = ReadTxt.ReadTxt('cleardata') #清除测试数据 sql = self.readtxthandle.get_clear_data() print('-------------------开始清除原测试数据-------------------') self.readdbhandle.modify_data(sql) print('-------------------结束清除原测试数据-------------------') print('--------------------开始创建测试数据--------------------')