LogoClawIndex
案例技能关于
LogoClawIndex

python-testing-patterns - 使用 pytest 和成熟模式构建 Python 测试

使用 pytest、fixture、模拟、参数化和测试驱动开发实现 Python 测试策略。

标签

更新于: 2026-10-15
Pythonpytest单元测试集成测试模拟fixture测试驱动开发异步测试

能力

典型输入

典型输出

该技能可以做什么

  • 编写 pytest 测试
  • 定义可复用 fixture
  • 参数化测试用例
  • 模拟外部依赖
  • 测试异步代码
  • 验证异常和覆盖率
  • 按 TDD 组织测试

输入

  • Python 源代码
  • 测试需求
  • 外部依赖
  • 数据库操作

输出

  • 测试文件
  • 测试执行结果
  • 覆盖率数据

要求

  • Python 运行环境
  • pytest 框架

来源

  • 规范: SKILL.md

ClawIndex

OpenClaw Skills 与 Use Case 索引

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

索引

Skills·
Cases

Meta

关于·
声明·
邮箱·
GitHub
© 2026 ClawIndex 保留所有权利。
编写 pytest 测试
定义可复用 fixture
参数化测试用例
模拟外部依赖
Python 源代码
测试需求
外部依赖
测试文件
测试执行结果
覆盖率数据