pytest-test-scaffolder

Generate pytest unit test scaffolds for Python backend functions and classes.

1|Updated Aug 12, 2025
One-click install
npx skills add https://github.com/okgoogle13/careercopilot --skill pytest-test-scaffolder
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: pytest-test-scaffolder
Source: https://github.com/okgoogle13/careercopilot/tree/main/.claude/skills/pytest-test-scaffolder
Command: npx skills add https://github.com/okgoogle13/careercopilot --skill pytest-test-scaffolder

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill scaffolds pytest tests for Python backend code, including endpoints, services, and utilities.

Core Features & Use Cases

  • Generates extensive pytest test files
  • Fixtures, mocks, and async support
  • Clear naming and test structure guidelines

Quick Start

Provide module/file path; Claude will generate tests under backend/app/tests.

Frequently Asked Questions about pytest-test-scaffolder

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

FAQPage Schema
How do I generate pytest tests for FastAPI endpoints?

This Skill automatically generates pytest test scaffolds for FastAPI endpoints, services, and utilities. Provide your module or file path, and it produces comprehensive test files with fixtures, mocks, and async support under backend/app/tests, following pytest best practices.

Can pytest scaffolding handle async code and mocking dependencies?

Yes. The Skill generates pytest-asyncio tests with built-in support for mocking external dependencies like Firestore, Genkit, and Firebase. It creates fixtures and comprehensive error scenarios for async Python backend functions.

What test scenarios does pytest scaffolding cover?

Generated tests include happy-path cases, error conditions, edge cases, and dependency mocks. The Skill structures tests with clear naming conventions, fixture management, and organized test files that follow pytest conventions and best practices.

Do I need to write pytest test files manually for every function?

No. This Skill automates test file generation for Python backend functions and classes, eliminating manual scaffolding. You provide the code path; it produces ready-to-use pytest test files with appropriate structure and coverage.

How does pytest scaffolding handle FastAPI async patterns?

The Skill detects async code patterns in FastAPI endpoints and services, generating pytest-asyncio-compatible tests with proper fixture setup and async test functions. It applies async best practices automatically in the generated test structure.

What's included in generated pytest fixtures and mocks?

Generated fixtures provide dependency injection and test isolation. Mocks cover external services like Firestore and Firebase. The Skill includes parameterized fixtures for multiple test scenarios and dependency injection patterns common in Python backends.