什麼是 test-implement-constructor-validation?
從服務類別簽章自動產生建構函式驗證測試。 在為新服務建立測試、驗證快速失敗原則時使用 確保建構函式驗證或測試所需參數。分析 服務 __init__ 方法並產生 pytest.raises(ValueError) 測試 對於每個必需的參數。適用於以下 Python 服務類 依赖注入模式。高自動化機會(100+ 測試類 使用此模式)。 來源:dawiddutoit/custom-claude。
從服務類別簽章自動產生建構函式驗證測試。 在為新服務建立測試、驗證快速失敗原則時使用 確保建構函式驗證或測試所需參數。分析 服務 __init__ 方法並產生 pytest.raises(ValueError) 測試 對於每個必需的參數。適用於以下 Python 服務類 依赖注入模式。高自動化機會(100+ 測試類 使用此模式)。
透過命令列快速安裝 test-implement-constructor-validation AI 技能到你的開發環境
來源:dawiddutoit/custom-claude。
Automatically generate comprehensive constructor validation tests for service classes that follow the fail-fast principle. This skill ensures every required parameter has a corresponding test that validates the service raises ValueError when that parameter is None.
Fixture Exclusion Pattern: Each validation test excludes the fixture for the parameter being tested:
For a complex service with 5 parameters, follow the same pattern as Example 1 above. Create a test class with fixtures for each parameter, a success case test, and one validation failure test for each required parameter. See references/reference.md for detailed pattern analysis and edge cases.
從服務類別簽章自動產生建構函式驗證測試。 在為新服務建立測試、驗證快速失敗原則時使用 確保建構函式驗證或測試所需參數。分析 服務 __init__ 方法並產生 pytest.raises(ValueError) 測試 對於每個必需的參數。適用於以下 Python 服務類 依赖注入模式。高自動化機會(100+ 測試類 使用此模式)。 來源:dawiddutoit/custom-claude。
為搜尋與 AI 引用準備的穩定欄位與指令。
npx skills add https://github.com/dawiddutoit/custom-claude --skill test-implement-constructor-validation從服務類別簽章自動產生建構函式驗證測試。 在為新服務建立測試、驗證快速失敗原則時使用 確保建構函式驗證或測試所需參數。分析 服務 __init__ 方法並產生 pytest.raises(ValueError) 測試 對於每個必需的參數。適用於以下 Python 服務類 依赖注入模式。高自動化機會(100+ 測試類 使用此模式)。 來源:dawiddutoit/custom-claude。
開啟你的終端機或命令列工具(如 Terminal、iTerm、Windows Terminal 等) 複製並執行以下指令:npx skills add https://github.com/dawiddutoit/custom-claude --skill test-implement-constructor-validation 安裝完成後,技能將自動設定到你的 AI 程式設計環境中,可以在 Claude Code、Cursor 或 OpenClaw 中使用
https://github.com/dawiddutoit/custom-claude