报错:pytest: error: argument -m: expected one argument (via addopts config)

错误:ERROR: usage: pytest options file_or_dir file_or_dir ...

pytest: error: argument -m: expected one argument (via addopts config)

原因:pytest.ini里面-m应该去掉,因为没指定标签。

复制代码
[pytest]
markers=
        smoke:冒烟测试
        system:系统测试
addopts=-v -s -m
testpaths=../pytest_test

应改为

复制代码
[pytest]
markers=
        smoke:冒烟测试
        system:系统测试
addopts=-v -s
testpaths=../pytest_test
相关推荐
测试界的小码农3 天前
【让 AI 生成的测试用例变成 pytest API 自动化脚本】
人工智能·测试用例·pytest
2601_9679873711 天前
Python在自动化测试中有哪些应用?
python自动化测试·selenium·appium·pytest·性能测试
Madison-No716 天前
pytest框架
pytest
凛铄linshuo21 天前
分析业务流程什么时候适合断言?
python·pytest
凛铄linshuo22 天前
自动化测试:pytest第一个实例学习
学习·pytest
Helix25025 天前
Python单元测试实战:pytest框架从入门到企业级测试体系搭建指南
python·单元测试·实战·mock·pytest·测试覆盖率·fixture
在世修行1 个月前
干货:pytest
pytest·fixture·pytest assert
小小龙学IT1 个月前
Python pytest 测试框架深度解析:从断言重写到插件生态的工程化测试体系
网络·python·pytest
落魄大学生之流水线上谋生计1 个月前
pytest 入门与实践:从第一个测试到可维护的测试体系
pytest
念越1 个月前
Allure 测试报告保姆级教程:从安装到 pytest 集成与报告生成
pytest·allure