路径兼容windows运行方式
This commit is contained in:
parent
2ab2ea9232
commit
34d51b5a68
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
### 技术栈:python+pytest+requests+allure+pytest-html
|
### 技术栈:python+pytest+requests+allure+pytest-html
|
||||||
|
|
||||||
- 选择语言:python>=3.8
|
- 选择语言:python>=3.10
|
||||||
- 编程工具选型:pycharm
|
- 编程工具选型:pycharm
|
||||||
- 测试框架选型:pytest
|
- 测试框架选型:pytest
|
||||||
- 报告可视化方案选型:allure、pytest-html
|
- 报告可视化方案选型:allure、pytest-html
|
||||||
|
|
|
@ -66,7 +66,7 @@ class Logger:
|
||||||
# os.path.join(os.path.dirname(os.path.abspath(__file__)), '../outFiles/logs'))
|
# os.path.join(os.path.dirname(os.path.abspath(__file__)), '../outFiles/logs'))
|
||||||
file_path = LOGS_DIR
|
file_path = LOGS_DIR
|
||||||
dir_name = time.strftime('%Y-%m-%d')
|
dir_name = time.strftime('%Y-%m-%d')
|
||||||
file_name = time.strftime('%Y-%m-%d %H:%M:%S') + '-' + 'log.log'
|
file_name = time.strftime('%Y-%m-%d_%H-%M-%S') + '-' + 'log.log'
|
||||||
if not os.path.exists(os.path.join(file_path, dir_name)):
|
if not os.path.exists(os.path.join(file_path, dir_name)):
|
||||||
os.makedirs(os.path.join(file_path, dir_name))
|
os.makedirs(os.path.join(file_path, dir_name))
|
||||||
cls._log_path = os.path.join(file_path, dir_name, file_name)
|
cls._log_path = os.path.join(file_path, dir_name, file_name)
|
||||||
|
|
Loading…
Reference in New Issue