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

相关推荐
开源优测9 小时前
Pytest中5种不同的方法解析JSON数据
log4j·json·pytest
不求大富大贵只求富可敌国10 小时前
Gtest, Junit,以及pytest对比理解
junit·pytest
xing25163 天前
pytest-html
前端·html·pytest
唐古乌梁海4 天前
【pytest】编写自动化测试用例命名规范README
自动化·pytest
xing25164 天前
pytest下allure
开发语言·python·pytest
IT求学人5 天前
pytest运行用例的常见方式及参数
pytest
开源优测6 天前
什么是pytest.ini及如何在Pytest中应用以提升配置效率
pytest
摸鱼仙人~7 天前
ImportError: cannot import name ‘FixtureDef‘ from ‘pytest‘
conda·pytest·fastapi