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

相关推荐
lucia_zl2 天前
pytest并发测试,资源问题导致用例失败解决办法
pytest
鱼鱼说测试2 天前
Selenium4+Pytest自动化测试框架实战
pytest
XYiFfang8 天前
【Pytest】解决Pytest中Teardown钩子的TypeError:实例方法与类方法的调用差异
python·pytest
Kingairy10 天前
Pytest 插件:pytest_runtest_protocol
python·pytest
AIZHINAN10 天前
Pytest 插件介绍和开发
测试工具·pytest·插件开发
灰阳阳12 天前
替身演员的艺术:pytest-mock 从入门到飙戏
自动化测试·python·pytest·unit testing·pytest-mock
年年测试15 天前
Playwright与PyTest结合指南
pytest
focksorCr16 天前
pytest 并发执行用例(基于受限的测试资源)
python·pytest
律品21 天前
pytest的前置与后置
开发语言·python·pytest