testing-patterns

Design and enforce pytest and Go testing patterns for unit, integration, and end-to-end tests.

Updated Sep 16, 2025
One-click install
npx skills add https://github.com/singh-gur/opencode --skill testing-patterns-singh-gur
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-patterns
Source: https://github.com/singh-gur/opencode/tree/main/skills/testing-patterns
Command: npx skills add https://github.com/singh-gur/opencode --skill testing-patterns-singh-gur

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill consolidates best practices for building robust tests across Python (pytest) and Go, helping teams reduce flakiness, improve maintainability, and accelerate debugging.

Core Features & Use Cases

  • Fixture design patterns for Python and Go tests, including factory, scoped, and conftest/fixtures hierarchies
  • Mocking strategies that emphasize boundary testing, with guidance on when to replace external I/O and services
  • Parametrization and property-based testing approaches to increase coverage with fewer tests

Quick Start

Apply factory and scoped pytest fixtures to design robust, maintainable tests for a Python project.

Frequently Asked Questions about testing-patterns

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

FAQPage Schema
How do I design reusable pytest fixtures to reduce test flakiness?

Design reusable pytest fixtures by applying factory, scoped, and conftest hierarchy patterns. This approach structures test organization, isolates external dependencies, and accelerates debugging to reduce overall test flakiness and improve maintainability.

What's the best way to mock external services in Python and Go testing?

The best way to mock external services is boundary testing, which replaces external I/O at system edges. This Skill provides mocking strategies for Python and Go that clarify when to substitute services, reducing flakiness without coupling tests to internal logic.

Can I use parametrization and property-based testing to increase coverage in pytest?

Yes, you can use parametrization and property-based testing approaches in pytest to increase coverage. These patterns generate broader test scenarios with fewer tests, accelerating debugging and improving maintainability across your Python projects.

Does this testing architecture support both unit and end-to-end integration tests?

Yes, this testing architecture supports unit, integration, and end-to-end testing for Python and Go. It addresses structured test organization, reusable fixtures, clear naming, and best-practice workflows applicable across all testing scopes.

When should I use Go testing patterns versus pytest for my test architecture?

Use Go testing patterns or pytest based on your project language, as this Skill consolidates best practices for both. It enforces robust testing patterns, structured organization, and clear naming to reduce flakiness and improve maintainability across Python and Go projects.