报错: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
相关推荐
IT求学人1 天前
pytest运行用例的常见方式及参数
pytest
开源优测2 天前
什么是pytest.ini及如何在Pytest中应用以提升配置效率
pytest
摸鱼仙人~3 天前
ImportError: cannot import name ‘FixtureDef‘ from ‘pytest‘
conda·pytest·fastapi
唐古乌梁海3 天前
【pytest-jira】自动化用例结合jira初版集成思路
pytest·jira
小码哥说测试4 天前
高效执行自动化用例:分布式执行工具pytest-xdist实战!
自动化测试·软件测试·功能测试·jmeter·pytest·postman·测试工程师
予早5 天前
pytest asyncio 支持插件 pytest-asyncio
pytest
爱学测试的雨果7 天前
Pytest自动化测试框架关联/参数化实战
前端·pytest
测试杂货铺7 天前
Pytest快速入门
自动化测试·软件测试·python·测试工具·职场和发展·测试用例·pytest