LogoClawIndex
案例技能关于
LogoClawIndex

pytest - Python 的 pytest 测试模式指南

提供使用 pytest 编写 Python 测试的代码模式与指南,涵盖 Fixture、Mock、参数化及标记等功能。

标签

更新于: 2026-09-15
pytestpython测试MockFixture

能力

典型输入

典型输出

该技能可以做什么

  • 编写 pytest 测试结构
  • 创建 pytest Fixture
  • 使用 patch 模拟依赖
  • 参数化测试用例
  • 应用 pytest 标记
  • 编写异步 pytest 测试

输入

  • Python 源代码
  • 测试需求规范

输出

  • pytest 测试代码
  • pytest 命令行指令

要求

  • Python 运行环境
  • pytest 依赖包

来源

  • 规范: SKILL.md

ClawIndex

OpenClaw Skills 与 Use Case 索引

ClawIndex 是一个生态驱动的 OpenClaw Skills 与真实 Use Case 索引站。

索引

Skills·
Cases

Meta

关于·
声明·
邮箱·
GitHub
© 2026 ClawIndex 保留所有权利。
编写 pytest 测试结构
创建 pytest Fixture
使用 patch 模拟依赖
参数化测试用例
Python 源代码
测试需求规范
pytest 测试代码
pytest 命令行指令