Command
/test
Run Python tests with pytest, unittest, or other testing frameworks.
One command from claude-code-templates.
shell
$ npx -y skills add davila7/claude-code-templates --agent claude-codeShips with claude-code-templates. Installing the plugin gets this command.
How it fires
How this command gets triggered: by you, by Claude, or both.
- Fires itselfClaude auto-loads it when your prompt matches the work.
- You can call itInvoke it directly when you want it.
- Slash command
/test
Context preview
What this command does when you run it.
Run Python tests with pytest, unittest, or other testing frameworks.
Stats
Stars29,852
Forks3,189
LanguagePython
LicenseMIT
Ships with claude-code-templates
Command definition
test.md
# Test Runner Run Python tests with pytest, unittest, or other testing frameworks. ## Purpose This command helps you run Python tests effectively with proper configuration and reporting. ## Usage ``` /test ``` ## What this command does 1. **Detects test framework** (pytest, unittest, nose2) 2. **Runs appropriate tests** with proper configuration 3. **Provides coverage reporting** if available 4. **Shows clear test results** with failure details ## Example Commands ### pytest (recommended) ```bash # Run all tests pytest # Run with coverage pytest --cov=src --cov-report=html # Run specific test file pytest tests/test_models.py # Run with verbose output pytest -v # Run tests matching pattern pytest -k "test_user" ``` ### unittest ```bash # Run all tests python -m unittest discover # Run specific test file python -m unittest tests.test_models
