报错: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
相关推荐
清水白石0081 天前
pytest Fixture 设计实战指南:作用域、依赖链、自动清理与测试资源高效复用
python·pytest
亚马逊云开发者2 天前
Amazon Nova Act 浏览器自动化测试实战:AI 驱动的端到端测试 + pytest 集成 + OpenClaw 场景落地
人工智能·pytest
cendy-LL3 天前
自动化测试之Pytest框架
pytest
我的xiaodoujiao3 天前
API 接口自动化测试详细图文教程学习系列7--相关Python基础知识6
python·学习·测试工具·pytest
忘忧记3 天前
pytest + YAML + requests`简单实例化
网络·pytest
我的xiaodoujiao4 天前
API 接口自动化测试详细图文教程学习系列8--测试接口
python·学习·测试工具·pytest
鹿鸣悠悠6 天前
pytest + requests + allure 接口自动化测试框架指南
pytest
忘忧记6 天前
pytest进阶参数化用法
前端·python·pytest
bug_rabbit6 天前
pytest-html 中文乱码问题终极解决方案(Windows版)
windows·html·pytest
庄小法6 天前
pytest
开发语言·python·pytest