问答 pytest+allure 运行报错 unrecognized arguments: --alluredir=./temps

晴天 · June 07, 2024 · Last by 晴天 replied at June 11, 2024 · 6978 hits

python 版本 3.11

已安装 pytest、allure-pytest

pytest.ini 中设置参数

运行 run.py 报错 unrecognized arguments: --alluredir=./temps

这个报错要怎么解决呀?请大神指点

共收到 6 条回复 时间 点赞

--alluredir =中的 = 替换为 空格 试试

--alluredir ./temps

testpaths = testcases/
addopts = -vs --alluredir=temps/

晴天 #4 · June 11, 2024 Author
难以怀瑾 回复

替换成空格了,也还是一样的报错 error: unrecognized arguments: --alluredir

晴天 #5 · June 11, 2024 Author
zhanghg 回复

pytest.ini 按这个调整了,不行,也是一样的报错

晴天 #6 · June 11, 2024 Author

问题解决了,在 python 的解释器里重新安装了下 allure-pytest,运行没有报错了

晴天 关闭了讨论 11 Jun 08:57
需要 Sign In 后方可回复, 如果你还没有账号请点击这里 Sign Up