pytest-test-generator_skill

This skill helps you generate production-ready pytest test configurations and guidance by following industry best practices for test automation.
  • Python

1.4k

GitHub Stars

1

Bundled Files

2 months ago

Catalog Refreshed

4 months ago

First Indexed

Readme & install

Copy the install command, review bundled files from the catalogue, and read any extended description pulled from the listing source.

Installation

Preview and clipboard use veilstrat where the catalogue uses aiagentskills.

npx veilstrat add skill jeremylongshore/claude-code-plugins-plus-skills --skill pytest-test-generator

  • SKILL.md2.1 KB

Overview

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.

How this skill works

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.

When to use it

  • When you need scaffolded pytest tests for existing functions or modules
  • When creating fixtures, parametrized tests, or mocking strategies
  • When configuring CI test runs or pytest.ini / tox setups
  • When you want production-ready test templates following pytest best practices
  • When improving or expanding test coverage quickly

Best practices

  • Generate small, isolated unit tests that assert one behavior per test
  • Use fixtures for shared setup and parametrization for multiple input cases
  • Prefer monkeypatch or unittest.mock for external dependencies to avoid network I/O
  • Include clear arrange-act-assert structure and meaningful test names
  • Add CI configuration that runs tests in a clean environment and fails fast

Example use cases

  • Create pytest test skeletons for a new Python module with typical edge cases
  • Auto-generate fixture-based integration tests for database access using transaction rollbacks
  • Produce parametrized tests for function inputs and expected outputs
  • Generate pytest.ini and GitHub Actions workflow to run tests on push and pull requests
  • Suggest mock patterns and example mocks for external APIs or filesystem interactions

FAQ

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.

Built by
VeilStrat
AI signals for GTM teams
© 2026 VeilStrat. All rights reserved.All systems operational
pytest-test-generator skill by jeremylongshore/claude-code-plugins-plus-skills | VeilStrat