test-harness

Generate runnable pytest test suites from Python functions, classes, or modules.

310|45|Updated Feb 22, 2026
One-click install
npx skills add https://github.com/Mathews-Tom/praxis-skills --skill test-harness
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: test-harness
Source: https://github.com/Mathews-Tom/praxis-skills/tree/main/skills/test-harness
Command: npx skills add https://github.com/Mathews-Tom/praxis-skills --skill test-harness

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes references (resource) components.

What problem does it solve?

Transforms Python functions, classes, or modules into comprehensive, runnable pytest test suites so developers can validate behavior, guard refactors, and enforce coverage without manual, error-prone test writing.

Core Features & Use Cases

  • Analyzes function signatures, dependency graphs, and complexity hotspots to enumerate happy path, boundary, error, and state tests.
  • Designs scoped fixtures, conftest candidates, and teardown to ensure isolation and minimal flakiness.
  • Produces mock strategies, patch boundaries, and async test patterns (pytest-asyncio) for code with external dependencies or coroutines.
  • Use cases: generate tests for a changed function before a PR, scaffold parametrized tests for complex logic, or produce async test stubs for coroutine-based services.

Quick Start

Generate a standard pytest file for the function calculate_discount in sample_module.py and include happy path, boundary, and error tests.

Frequently Asked Questions about test-harness

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I generate pytest test suites from Python functions automatically?

Generate pytest test suites by analyzing Python function signatures and dependency boundaries to output runnable, parametrized test files with fixtures, mock strategies, and happy path, boundary, and error cases.

What's the best way to write pytest tests for async Python functions?

Write pytest tests for async Python functions by generating test stubs with optional pytest-asyncio support, producing coroutine test patterns that validate external dependencies and async behavior.

How do I create pytest fixtures and conftest setups for complex modules?

Create pytest fixtures by designing scoped fixtures, conftest candidates, and teardown procedures from module dependency graphs, ensuring test isolation and minimal flakiness for complex logic validation.

Can I generate parametrized pytest tests for boundary and error cases?

Generate parametrized pytest tests by analyzing complexity hotspots and function signatures to enumerate boundary, error, and state test cases into runnable, parametrized pytest files.

How do I set up mocking strategies for Python unit tests?

Set up mocking strategies by defining patch boundaries and mock objects for external dependencies, generating test files that isolate function behavior and validate execution paths without manual test writing.

Does pytest test generation work for integration testing Python classes?

Pytest test generation works for integration testing Python classes by analyzing dependency graphs and complexity hotspots to produce comprehensive test suites covering state transitions and module interactions.