pytest下放pytest.ini文件就导致报错:ERROR: file or directory not found: #

pytest下放pytest.ini文件就导致报错:ERROR: file or directory not found: #

如下:

项目文件目录如下:

pytest.ini文件内容:

python 复制代码
[pytest]
addopts = -v -s --alluredir = ./allure-results  # 自动添加的命令行参数:
                                              # -v:详细输出
                                              # -s:打印输出信息
                                              # --alluredir:指定Allure结果保存目录
testpaths = test_cases       # 指定测试目录
python_files = test_*.py     # 匹配测试文件模式

怎么改路径就是报错,没办法只能把这个文件pytest.ini去掉l,在cmd里手动写执行命令了pytest -vs --alluredir=./result/ --clean-alluredir

allure generate ./result2 -o ./report2 --clean

相关推荐
思则变2 天前
[Pytest][Part 1]Pytest 自动化测试框架
pytest
思则变3 天前
[Pytest] [Part 2]增加 log功能
开发语言·python·pytest
思则变4 天前
[Pytest][Part 3]检测python package状态
pytest
cooldream200918 天前
pytest 框架详解与实战指南
pytest·测试
慕城南风18 天前
【pytest进阶】Pytest之conftest详解
pytest
编程小白gogogo19 天前
AI自动化测试速成(Pytest框架)
pytest
慕城南风19 天前
【pytest进阶】pytest详解及进阶使用
linux·服务器·pytest
Tom Boom25 天前
Pytest断言全解析:掌握测试验证的核心艺术
自动化测试·python·测试开发·pytest
不要一直敲门1 个月前
初学 pytest 记录
pytest