home / skills / jeremylongshore / claude-code-plugins-plus-skills / pytest-test-generator
This skill helps you generate production-ready pytest test configurations and guidance by following industry best practices for test automation.
npx playbooks add skill jeremylongshore/claude-code-plugins-plus-skills --skill pytest-test-generatorReview the files below or copy the command above to add this skill to your agents.
---
name: "pytest-test-generator"
description: |
Generate pytest test generator operations. Auto-activating skill for Test Automation.
Triggers on: pytest test generator, pytest test generator
Part of the Test Automation skill category. Use when writing or running tests. Trigger with phrases like "pytest test generator", "pytest generator", "pytest".
allowed-tools: "Read, Write, Edit, Bash(cmd:*), Grep"
version: 1.0.0
license: MIT
author: "Jeremy Longshore <[email protected]>"
---
# Pytest Test Generator
## Overview
This skill provides automated assistance for pytest test generator tasks within the Test Automation domain.
## When to Use
This skill activates automatically when you:
- Mention "pytest test generator" in your request
- Ask about pytest test generator patterns or best practices
- Need help with test automation skills covering unit testing, integration testing, mocking, and test framework configuration.
## Instructions
1. Provides step-by-step guidance for pytest test generator
2. Follows industry best practices and patterns
3. Generates production-ready code and configurations
4. Validates outputs against common standards
## Examples
**Example: Basic Usage**
Request: "Help me with pytest test generator"
Result: Provides step-by-step guidance and generates appropriate configurations
## Prerequisites
- Relevant development environment configured
- Access to necessary tools and services
- Basic understanding of test automation concepts
## Output
- Generated configurations and code
- Best practice recommendations
- Validation results
## Error Handling
| Error | Cause | Solution |
|-------|-------|----------|
| Configuration invalid | Missing required fields | Check documentation for required parameters |
| Tool not found | Dependency not installed | Install required tools per prerequisites |
| Permission denied | Insufficient access | Verify credentials and permissions |
## Resources
- Official documentation for related tools
- Best practices guides
- Community examples and tutorials
## Related Skills
Part of the **Test Automation** skill category.
Tags: testing, jest, pytest, mocking, tdd
This skill automates generation of pytest tests and related configurations for Python projects. It helps produce unit and integration test scaffolding, fixtures, mocks, and CI-friendly test layouts. Use it to accelerate test coverage, enforce patterns, and produce runnable pytest code samples.
The skill inspects the target code, test requirements, and project layout to propose pytest test functions, fixtures, and parametrized cases. It generates code snippets, configuration files (pytest.ini, tox, or GitHub Actions), and suggests mocking or dependency-injection points. Outputs are validated against common pytest conventions and basic linting rules.
Can the skill run tests or only generate code?
It focuses on generating tests and configurations; running tests is done in your environment, though generated CI configs enable automated runs.
Does it handle complex dependencies like async code or DB fixtures?
Yes—outputs include async test patterns, async fixtures, and transaction-aware DB fixture templates when you indicate those needs.