<< All versions
Skill v1.0.0
currentAutomated scan100/100baliaga-repo/vibe-tools/unit-test-generator
──Details
PublishedOctober 25, 2026 at 02:46 AM
Content Hashsha256:a5daa3086b741cd8...
Git SHA0fd5d4bf4381
──Files
Files (1 file, 1.4 KB)
SKILL.md1.4 KBactive
SKILL.md · 23 lines · 1.4 KB
version: "1.0.0" name: unit-test-generator description: Automated guidelines for designing, scaffolding, and executing isolated Python unit tests using pytest and unittest.mock. Focuses on zero-regression verification, mocking heavy dependencies (DaVinci Resolve SDK, FFmpeg, yt-dlp), and token-efficient test creation.
Skill: Unit Test Generator
Scaffold and execute fast, isolated Python unit tests for automation pipelines.
Principles
- Strict Mocking: Never require live internet, GUI, or external binaries. Mock heavy SDKs, subprocesses, and network APIs via
unittest.mock(MagicMock,patch) orpytestfixtures (tmp_path,monkeypatch). - Granular & Concise: Scope tests to discrete functions (keep suites < 150 lines).
- Repository Rules: Place tests in
tests/test_<module>.py. Use Indonesian docstrings and comments.
Workflow & Recipes
- Analyze: Identify pure functions vs side-effect boundaries (I/O, subprocess, SDK).
- Scaffold: Create
tests/test_<name>.pycovering happy paths, edge cases, and error fallback. - Mocking Pattern:
- DaVinci Resolve SDK: Patch resolver function, mock
ProjectManager -> CurrentProject -> CurrentTimeline. - Subprocess / CLI: Patch
subprocess.runto returnMagicMock(returncode=0, stdout=...).
- Execution: Run
pytest tests/test_<name>.py -v(orpython -m unittest).