报错: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
相关推荐
我的xiaodoujiao4 天前
API 接口自动化测试详细图文教程学习系列11--Requests模块3--测试练习
开发语言·python·学习·测试工具·pytest
我的xiaodoujiao5 天前
API 接口自动化测试详细图文教程学习系列12--Requests模块4--测试实践操作
python·学习·测试工具·pytest
Lightning-py6 天前
pytest 软断言的几种方式
pytest
Lightning-py7 天前
pytest后置处理方式
pytest
爆更小哇8 天前
Python自动化测试:pytest新手快速入门指南
python·测试工具·自动化·pytest
qq_452396238 天前
第一篇:基座选型 —— 为什么 Pytest 是自动化的终点?
自动化·pytest
时光不写代码9 天前
修复 pytest-asyncio 事件循环冲突:完整解决方案
python·pytest·fastapi
上天_去_做颗惺星 EVE_BLUE9 天前
接口自动化测试全流程:pytest 用例收集、并行执行、Allure 报告合并与上传
python·pytest
踏着七彩祥云的小丑9 天前
pytest——Mark标记
开发语言·python·pytest
lifewange10 天前
pytest-类中测试方法、多文件批量执行
开发语言·python·pytest