testing-patterns

Standardize Python test directories, fixtures, mocking, and DAG validation.

Updated Jan 16, 2026
One-click install
npx skills add https://github.com/MGPowerlytics/nhlstats --skill testing-patterns-mgpowerlytics
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing-patterns
Source: https://github.com/MGPowerlytics/nhlstats/tree/main/.github/skills/testing-patterns
Command: npx skills add https://github.com/MGPowerlytics/nhlstats --skill testing-patterns-mgpowerlytics

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

This Skill solves the problem of establishing consistent testing patterns for Python applications.

Core Features & Use Cases

  • Standardized test directory structure and conventions for Python projects.
  • Reusable fixtures and mocking practices to speed up test development.
  • Guidance for data validation tests, CI integration, and coverage enforcement.
  • Use Case: A team standardizes all modules with unit, integration, and DAG tests to achieve reliable, repeatable results across releases.

Quick Start

Install dependencies from requirements.txt Run pytest with coverage: pytest --cov=tests --cov-report=term-missing Generate a coverage report: pytest --cov=tests --cov-report=html

Frequently Asked Questions about testing-patterns

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

FAQPage Schema
How do I structure pytest fixtures and mocking for consistent Python testing?

Standardized pytest fixtures and API mocking practices establish consistent Python testing by enforcing reusable components and a unified test directory structure across projects. This speeds up test development and ensures reliable, repeatable results across releases.

What is DAG testing and when do I need it for data validation?

DAG testing validates data flows within your Python applications to ensure pipeline integrity. You need it when processing directed acyclic graphs to verify data transformations and enforce reliable execution across complex data pipelines.

How do I enforce 85% code coverage in pytest?

You enforce 85% code coverage by running pytest with coverage flags like `--cov` and `--cov-report=term-missing`. This configuration generates detailed reports highlighting untested code paths, ensuring your modules meet strict coverage enforcement rules.

Does this testing pattern work with existing CI integration and Python projects?

Yes, these testing patterns provide guidance for CI integration and apply to existing Python projects. They standardize unit, integration, and DAG tests without requiring external dependencies, ensuring reliable results across releases within your current environment.

What's the best way to generate a test coverage report for Python applications?

The best way to generate a test coverage report is using `pytest --cov=tests --cov-report=html`. This command executes your test suite and outputs a comprehensive HTML report detailing coverage metrics and missing lines across your Python application.