← All skills

unittest Skill

Unit testingPython

Copy and Paste in your Terminal

npx skills add https://github.com/LambdaTest/agent-skills.git --skill unittest-skill

Overview

When to Apply: Reference when using Python's standard library unittest, using unittest.mock.patch for mocking, or when pytest is not available/preferred. Triggers on "unittest", "TestCase", "self.assertEqual", "Python unittest".

Playbook Deep Dive (9 sections): §1 Project Setup · §2 Core Test Patterns · §3 Mocking & Patching · §4 SubTest & Parameterized · §5 Time & Environment Mocking · §6 Custom TestCase & Mixins · §7 CI/CD Integration · §8 Debugging Table · §9 Best Practices

The agent loads from 2 on-demand reference files (advanced-patterns.md, playbook.md) containing detailed implementation guides, cloud integration patterns, debugging tables, and language-specific best practices.

For full reference, implementation samples, and cloud setup, see the Documentation, Playbook, Advanced patterns tabs.