Appium 【求助】module 'pytest' has no attribute 'allure'

醋精测试媛 · 2021年04月01日 · 最后由 醋精测试媛 回复于 2021年04月02日 · 2008 次阅读

网上千篇一律的解决方法是:

pip uninstall pytest-allure-adaptor
pip install allure-pytest

可是我没有安装 pytest-allure-adaptor,只安装了 allure-pytest:

请问大家知道是怎么回事吗?求大佬解惑!

python 3.9
allure-pytest-2.8.40
pytest-6.2.2

共收到 8 条回复 时间 点赞

顶一哈😊

你在安装 pytest 的时候看下,pip 结果,
然后你在安装 allure-pytest 之后再看下结果,你就知道了

七星瓢虫 回复

我的 pytest 和 allure-pytest 是一起装好的,您可以看上面的图

有点奇怪,我是直接 pip install –U allure-pytest,然后配置 allure 环境变量就可以了

看一下是该用 pip , 还是 pip3 .

安装到 d:/python 下有点奇怪啊,我好多年不用 win 了, 至少是 python3 目录下吧?

hellohell 回复

试过了 pip3 或者 pip 都是一样的,d:/python 就是 python3 的路径,下面报告了 script 等子文件夹

大帅 回复

我也是这么做的,allure 下的是最新的 2.13,环境变量也有配置

答案是 module 'pytest' has no attribute 'allure'是真的,不能用@pytest.allure....这种方法了,直接是@allure....方法

醋精测试媛 关闭了讨论 04月02日 14:33
需要 登录 後方可回應,如果你還沒有帳號按這裡 注册