auto_test_dev/configs/globalParams.py
2024-11-11 17:16:31 +08:00

37 lines
1.4 KiB
Python

# !/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'),
}