报错: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
相关推荐
淼_@淼15 小时前
pytest-数据驱动
pytest
我的xiaodoujiao1 天前
使用 Python 语言 从 0 到 1 搭建完整 Web UI自动化测试学习系列 27--二次封装方法--优化断言结果
python·学习·测试工具·pytest
淼_@淼3 天前
pytest简介
运维·服务器·pytest
奶茶精Gaaa4 天前
【ZJ】Pytest框架搭建
pytest
趙卋傑4 天前
接口自动化测试
python·pycharm·pytest
测试界萧萧6 天前
Jenkins+Allure+Pytest的持续集成
自动化测试·软件测试·功能测试·程序人生·ci/cd·jenkins·pytest
nvd117 天前
Pytest 中使用 SQLAlchemy 进行异步数据库测试
数据库·oracle·pytest
文人sec8 天前
pytest1-接口自动化测试场景
软件测试·python·单元测试·pytest
我的xiaodoujiao8 天前
使用 Python 语言 从 0 到 1 搭建完整 Web UI自动化测试学习系列 25--数据驱动--参数化处理 Excel 文件 2
前端·python·学习·测试工具·ui·pytest