报错信息为:
ERROR: usage: ConstructionManagement_test.py [options] [file_or_dir] [file_or_dir] […]
ConstructionManagement_test.py: error: unrecognized arguments: --alluredir …/report/tmp
inifile: None
原因:是由于pacharm里面安装了多个python版本,导致allure安装和pycharm中python版本执行的不一致造成的。
解决办法:
pycharm中要执行的py文件右键,选择open in Terminal,然后在Terminal中输入pip install allure-pytest,安装allure。完毕后直接运行就可以了。
pytest+allure执行用例报错:error: unrecognized arguments
最新推荐文章于 2024-04-16 18:27:00 发布