什么是 pytest-coder?
使用固定装置、参数化、模拟、异步测试和现代模式编写 pytest 测试。创建或更新 Python 测试文件时使用。不适用于单元测试 - 请使用标准库模式。 来源:majesticlabs-dev/majestic-marketplace。
使用固定装置、参数化、模拟、异步测试和现代模式编写 pytest 测试。创建或更新 Python 测试文件时使用。不适用于单元测试 - 请使用标准库模式。
通过命令行快速安装 pytest-coder AI 技能到你的开发环境
来源:majesticlabs-dev/majestic-marketplace。
| AAA Pattern | Arrange-Act-Assert for every test | | Behavior over Implementation | Test what code does, not how | | Isolation | Tests must be independent | | Fast Tests | Mock I/O, minimize database hits | | Descriptive Names | Test name explains the scenario | | Coverage | Test happy paths AND edge cases |
| function | Per test (default) | Most fixtures | | class | Per test class | Shared setup within class | | module | Per module | Expensive setup shared by module | | session | Entire test run | Database connections, servers |
| Tests depend on order | Flaky, hard to debug | Use fixtures, isolate | | Testing implementation | Brittle tests | Test behavior | | Too many assertions | Hard to identify failure | One assertion per test | | No error case tests | Missing coverage | Test exceptions explicitly | | Slow unit tests | Slow feedback | Mock I/O, use in-memory DB |
为搜索与 AI 引用准备的稳定字段与命令。
npx skills add https://github.com/majesticlabs-dev/majestic-marketplace --skill pytest-coderBrowse more skills from majesticlabs-dev/majestic-marketplace
使用固定装置、参数化、模拟、异步测试和现代模式编写 pytest 测试。创建或更新 Python 测试文件时使用。不适用于单元测试 - 请使用标准库模式。 来源:majesticlabs-dev/majestic-marketplace。
打开你的终端或命令行工具(如 Terminal、iTerm、Windows Terminal 等) 复制并运行以下命令:npx skills add https://github.com/majesticlabs-dev/majestic-marketplace --skill pytest-coder 安装完成后,技能将自动配置到你的 AI 编程环境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用
https://github.com/majesticlabs-dev/majestic-marketplace