Arthur-Wu commit
This commit is contained in:
36
configs/globalParams.py
Normal file
36
configs/globalParams.py
Normal file
@ -0,0 +1,36 @@
|
||||
# !/usr/bin/python
|
||||
# -*- coding: utf-8 -*-
|
||||
import os,datetime,time
|
||||
from datetime import datetime,timedelta
|
||||
from commons.FileHandler import YamlHandler as yam
|
||||
from commons.SignatureYM import SignatureYM
|
||||
|
||||
|
||||
__RootPath = os.path.dirname(os.path.dirname(__file__)).replace("\\", "/")
|
||||
__YamlFilePath = os.path.join(__RootPath, "configs/Configs.yaml").replace("\\", "/")
|
||||
ProCfgData = yam().read_yaml(__YamlFilePath)
|
||||
HEADERS = SignatureYM().return_headers()
|
||||
GlobalPath = {
|
||||
"CfgPath": os.path.join(__RootPath, 'configs').replace("\\", "/"),
|
||||
"YMDataPath": os.path.join(__RootPath, 'YiMao/data').replace("\\", "/"),
|
||||
"YMCfgPath": os.path.join(__RootPath, 'YiMao/config').replace("\\", "/"),
|
||||
"YMCaseScriptsPath": os.path.join(__RootPath, 'YiMao/scripts').replace("\\", "/"),
|
||||
"YMReportPath": os.path.join(__RootPath, 'YiMao/report').replace("\\", "/")
|
||||
}
|
||||
GlobalParams = {
|
||||
"timeStamp": int(time.time()),
|
||||
"todayDate": time.strftime('%Y-%m-%d'),
|
||||
"todayDateDel1": (datetime.now() + timedelta(days=-1)).strftime('%Y-%m-%d'),
|
||||
"todayDateAdd1": (datetime.now() + timedelta(days=1)).strftime('%Y-%m-%d'),
|
||||
"todayDateAdd2": (datetime.now() + timedelta(days=2)).strftime('%Y-%m-%d'),
|
||||
"todayDateAdd3": (datetime.now() + timedelta(days=3)).strftime('%Y-%m-%d'),
|
||||
"todayDateAdd4": (datetime.now() + timedelta(days=4)).strftime('%Y-%m-%d'),
|
||||
"todayDateAdd5": (datetime.now() + timedelta(days=5)).strftime('%Y-%m-%d'),
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user