LogoClawIndex
案例技能关于
LogoClawIndex

python-testing - 应用 pytest 与 TDD 测试模式

提供使用 pytest 的 Python 测试策略,涵盖 TDD、fixture、模拟、参数化和覆盖率实践。

标签

更新于: 2026-10-05
PythonpytestTDD测试 fixture模拟参数化代码覆盖率

能力

典型输入

典型输出

该技能可以做什么

  • 编写 pytest 测试
  • 应用 TDD 循环
  • 创建和管理 fixture
  • 参数化测试用例
  • 模拟外部依赖
  • 测量测试覆盖率
  • 使用标记筛选测试

输入

  • Python 项目代码
  • 测试需求
  • 外部依赖

输出

  • pytest 测试文件
  • 测试结果消息
  • 覆盖率报告

要求

  • Python 环境
  • 已安装 pytest

来源

  • 规范: SKILL.md

ClawIndex

OpenClaw Skills 与 Use Case 索引

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

索引

Skills·
Cases

Meta

关于·
声明·
邮箱·
GitHub
© 2026 ClawIndex 保留所有权利。
编写 pytest 测试
应用 TDD 循环
创建和管理 fixture
参数化测试用例
Python 项目代码
测试需求
外部依赖
pytest 测试文件
测试结果消息
覆盖率报告