Pragmatic Python Test Generator

0•

Generates high-confidence pytest suites with automated support for async, SQLite, and HTTP mocking.

The gen-tests-python skill is a specialized scaffolding tool for Python developers that automates the creation of unit and integration tests while adhering to a pragmatic, production-ready philosophy. It intelligently maps business invariants from domain documentation, handles asynchronous code using pytest-asyncio's auto mode, and ensures database reliability by using real SQLite instances via tmp_path instead of brittle mocks. By integrating respx for network simulation and enforcing a clear separation between unit and integration tests, it helps developers build robust test suites that focus on real-world behavior and production confidence rather than arbitrary coverage metrics.

主要功能

01Smart invariant mapping using project-specific domain documentation (Ubiquitous Language).
02Realistic persistence testing using temporary SQLite paths instead of mocks.
03Efficient HTTP mocking via respx to prevent network-dependent test failures.
04Native support for async/await testing with pytest-asyncio auto mode.
05Automated pytest scaffolding for modules, functions, or specific use cases.
060 GitHub stars

使用场景

01Adding integration tests for services that interact with SQLite databases or external APIs.
02Scaffolding edge-case and 'happy path' tests based on project domain rules.
03Generating a comprehensive test suite for a new Python business logic module.