报错: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
相关推荐
唐古乌梁海1 小时前
【pytest 】 pytest 生命周期
pytest
专职1 天前
pytest详细教程
开发语言·python·pytest
乄捷径1 天前
pytest入门到熟练
pytest
专职1 天前
pytest+requests+allure生成接口自动化测试报告
开发语言·python·pytest
小熊出擊2 天前
【pytest】fixture 内省(Introspection)测试上下文
python·单元测试·pytest
小熊出擊3 天前
【pytest】finalizer 执行顺序:FILO 原则
python·测试工具·单元测试·pytest
小熊出擊4 天前
【pytest】使用 marker 向 fixture 传递数据
python·pytest
wa的一声哭了4 天前
Deep Learning Optimizer | Adam、AdamW
人工智能·深度学习·神经网络·机器学习·自然语言处理·transformer·pytest
专职6 天前
pytest生成测试用例,allure生成测试报告
测试用例·pytest
小丁爱养花9 天前
接口自动化测试 - pytest [1]
python·自动化·pytest