解决Pytest UnknownMarkWarning: Unknown pytest.mark.single - is this a typo?

解决 Pytest UnknownMarkWarning: Unknown pytest.mark.single - is this a typo?

出现截图所示问题

前提:

1.项目中使用了mark标记:

复制代码
@pytest.mark.single

2.同时项目中包含pytest.ini文件并进行了pytest.ini配置

运行项目

运行时报出截图所示Warning

解决方法:

切换运行项目的路径------测试样例所在文件夹路径

再次运行之后就没有mark相关warning了

相关推荐
名字还没想好☜30 分钟前
Python concurrent.futures 实战:用 ThreadPoolExecutor 并发处理 + as_completed 收结果
数据库·python·php·并发
爱码小白37 分钟前
importlib模块
开发语言·前端·python
axinawang1 小时前
第25课 for循环的应用
python
逻极1 小时前
FastAPI 实战:从入门到自动化文档,如何把API开发效率提升200%
python·api·fastapi·swagger·异步
半兽先生2 小时前
大模型技术开发与应用——5.大模型Agent开发(CrewAI)
大数据·人工智能·python·机器学习·ai
Logintern092 小时前
pytest的AST 断言重写
pytest
眼泪划过的星空2 小时前
快速了解LangGraph:构建智能Agent工作流的核心框架
人工智能·python·langchain
IsSh9nj6q2 小时前
Python全栈应用搭建神器magic-dash .新版本介绍
开发语言·python·dash
Cachel wood3 小时前
hands-on-modern-rl:动手学强化学习策略梯度reinforce
开发语言·python
蓝斯4973 小时前
一碰即传,重构跨设备文件分享体验
开发语言·python·重构