Esempio n. 1
0
    def __init__(self):
        self.config = ConfigParser()
        self.log = Log.MyLog()

        # path = os.path.dirname(os.path.dirname(os.path.realpath('__file__')))
        path = 'E:\\TEST\\DataSourceTest\\'
        self.config_path = path +'\\config'+'\\config.ini'
        # print(self.config_path)
        if not os.path.exists(self.config_path):
            self.log.error("请确保配置文件存在!")
            raise FileNotFoundError("请确保配置文件存在!")

        self.config.read(self.config_path,encoding='utf-8')
Esempio n. 2
0
    def __init__(self,filename,url,i,param,response,expectmsg,passOrNot):
        self.filename = filename
        path = 'E:\\TEST\\DataSourceTest\\commons\\Result\\' + self.filename+time.strftime("%Y-%m-%d %H-%M")+ '_Result.xls'
        print(self.filename)
        print(path)
        self.e = Excel.Excel(path)
        if os.path.exists(path):
            pass
        else:
            self.e.create_excel()
        self.log = Log.MyLog()

        self.url = url
        self.i = i
        self.param = param
        self.response = response
        self.expectmsg = expectmsg
        self.passOrNot = passOrNot
Esempio n. 3
0
 def __init__(self):
     self.log = Log.MyLog()