·test-implement-factory-fixtures
</>

test-implement-factory-fixtures

创建工厂夹具模式,以实现具有变化的可定制测试设置。 在构建具有多种配置的可重复使用的测试装置时使用,创建 可参数化的模拟,或实现测试数据构建器。与 pytest 一起使用 固定装置、模拟对象和测试实用程序。启用 DRY 测试设置 保持边缘情况的灵活性。

4安装·0热度·@dawiddutoit

安装

$npx skills add https://github.com/dawiddutoit/custom-claude --skill test-implement-factory-fixtures

如何安装 test-implement-factory-fixtures

通过命令行快速安装 test-implement-factory-fixtures AI 技能到你的开发环境

  1. 打开终端: 打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等)
  2. 运行安装命令: 复制并运行以下命令:npx skills add https://github.com/dawiddutoit/custom-claude --skill test-implement-factory-fixtures
  3. 验证安装: 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

来源:dawiddutoit/custom-claude。

SKILL.md

查看原文

Factory fixtures are pytest fixtures that return callable functions, enabling dynamic test setup with customizable parameters. This pattern eliminates test duplication while maintaining flexibility for edge cases and variations.

Use for: Services with success/failure modes, varying return types, different dimensions.

Use for: Complex configuration objects, hierarchical settings, many attributes.

创建工厂夹具模式,以实现具有变化的可定制测试设置。 在构建具有多种配置的可重复使用的测试装置时使用,创建 可参数化的模拟,或实现测试数据构建器。与 pytest 一起使用 固定装置、模拟对象和测试实用程序。启用 DRY 测试设置 保持边缘情况的灵活性。 来源:dawiddutoit/custom-claude。

可引用信息

为搜索与 AI 引用准备的稳定字段与命令。

安装命令
npx skills add https://github.com/dawiddutoit/custom-claude --skill test-implement-factory-fixtures
分类
</>开发工具
认证
收录时间
2026-02-25
更新时间
2026-03-10

Browse more skills from dawiddutoit/custom-claude

快速解答

什么是 test-implement-factory-fixtures?

创建工厂夹具模式,以实现具有变化的可定制测试设置。 在构建具有多种配置的可重复使用的测试装置时使用,创建 可参数化的模拟,或实现测试数据构建器。与 pytest 一起使用 固定装置、模拟对象和测试实用程序。启用 DRY 测试设置 保持边缘情况的灵活性。 来源:dawiddutoit/custom-claude。

如何安装 test-implement-factory-fixtures?

打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/dawiddutoit/custom-claude --skill test-implement-factory-fixtures 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用

这个 Skill 的源码在哪?

https://github.com/dawiddutoit/custom-claude