testing

Enforce pytest-based workflows for writing Python tests with naming conventions and fixtures.

Updated Dec 1, 2025
One-click install
npx skills add https://github.com/mandersogit/brynhild-harness --skill testing-mandersogit
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/mandersogit/brynhild-harness/tree/main/tests/fixtures/plugins/test-complete/skills/testing
Command: npx skills add https://github.com/mandersogit/brynhild-harness --skill testing-mandersogit

SYSTEM DOCUMENTATION & REQUIREMENTS

💡 This Skill includes scripts (resource) components.

What problem does it solve?

This Skill encapsulates best practices for writing Python tests, helping you structure tests, improve coverage, and maintain reliability as your codebase grows.

Core Features & Use Cases

  • Test structure and naming guidelines
  • Use of pytest fixtures, parametrization, and isolation
  • Strategies for coverage, speed, and maintainability
  • How to review and improve tests over time

Quick Start

Review the included examples and templates, and use the provided run_tests.sh to see pytest usage in action.

Frequently Asked Questions about testing

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

FAQPage Schema
How do I improve test coverage in my Python project?

Test coverage improves by writing unit tests that exercise happy paths and edge cases using pytest. This Skill provides best practices for structuring tests with fixtures, naming conventions, and fast isolated tests under 100ms to systematically expand coverage as your codebase grows.

What's the best way to structure pytest tests and fixtures?

Structure pytest tests using naming conventions, pytest fixtures for isolation, and parametrization to reduce duplication. This Skill covers fixture-based test design patterns that separate setup from test logic, making tests maintainable and reliable.

How do I set up a pytest workflow with fast unit tests?

Set up pytest with a test execution script like run_tests.sh, organize tests by naming convention, use fixtures for repeatable setup, and keep unit tests under 100ms. This Skill provides templates and scripts to enforce this pytest-based workflow from the start.

Can I use pytest fixtures to isolate and refactor existing tests?

Yes, pytest fixtures enable test isolation by managing setup and teardown, reducing test interdependencies. This Skill teaches refactoring test code to use fixture-based isolation, improving maintainability and making tests easier to modify over time.

What testing patterns help handle edge cases and prevent regressions?

Edge case coverage combined with fast unit tests prevents regressions. This Skill guides identifying happy paths and edge cases, using parametrization to test multiple scenarios efficiently, and reviewing test quality to maintain reliability as code evolves.