当前位置:首页 » 《随便一记》 » 正文

Pytest+Allure使用问题记录_leaforever_的博客

7 人参与  2022年04月19日 09:44  分类 : 《随便一记》  评论

点击全文阅读


1、安装

安装过程在网上可以查到很详细的讲解,资料也较多。

2、pytest-allure-adaptor问题

大部分问题是因为,安装了”pytest-allure-adaptor“导致的,比如:
No module named 'allure.pytest_plugin'; 'allure' is not a package
此时,需要先卸载pytest-allure-adaptor,然后再 pip 安装allure-pytest包,已经安装过的不用重复安装。

3、版本问题

类似于pluggy.manager.PluginValidationError: unknown hook 'pytest_namespace' in plugin <module 'allure.pytest_plugin' from 'C:\\Users\\wenqi\\AppData\\Roaming\\Python\\Python37\\site-packages\\allure\\pytest_plugin.py'>这种,一般是因为pytest版本太高导致,建议卸载现有版本并安装较低版本的pytest。

pip uninstall pytest
pip install pytest==4.0.2

4、后续

重装低版本pytest出现如下报错:
TypeError: attrib() got an unexpected keyword argument 'convert'
重装pytest最新版本并重装allure-pytest包

pip uninstall pytest
pip install pytest
pip install allure-pytest

点击全文阅读


本文链接:http://zhangshiyu.com/post/38398.html

版本  重装  是因为  
<< 上一篇 下一篇 >>

  • 评论(0)
  • 赞助本站

◎欢迎参与讨论,请在这里发表您的看法、交流您的观点。

关于我们 | 我要投稿 | 免责申明

Copyright © 2020-2022 ZhangShiYu.com Rights Reserved.豫ICP备2022013469号-1