什麼是 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