Agent skill
testing
Best practices for writing Python tests - use when creating or improving test coverage
Install this agent skill to your Project
npx add-skill https://github.com/mandersogit/brynhild-harness/tree/main/tests/fixtures/plugins/test-complete/skills/testing
Metadata
Additional technical details for this skill
- framework
- pytest
SKILL.md
Testing Skill
[TEST-PLUGIN-SKILL: testing]
When to Use This Skill
Use this skill when:
- Writing new tests
- Improving test coverage
- Refactoring test code
- Setting up test infrastructure
Test Structure
class TestFeatureName:
"""Tests for specific feature."""
def test_specific_behavior(self) -> None:
"""One test, one assertion pattern."""
# Arrange
input_data = create_test_data()
# Act
result = function_under_test(input_data)
# Assert
assert result == expected_value
Best Practices
- Naming:
test_<behavior>_<condition>_<expected> - Isolation: Each test independent, use fixtures
- Coverage: Test happy path, edge cases, errors
- Speed: Keep unit tests fast (<100ms each)
Recommended Agent Skills
Expand your agent's capabilities with these related and highly-rated skills.
brynhild-development
Guidelines for contributing to brynhild itself - use when making changes to the brynhild codebase, running tests, or understanding project conventions
commit-helper
Create and execute git commit plans from YAML files - use when organizing changes into logical commits or when user wants help structuring their git history
skill-creator
Create effective skills for brynhild agents. Use when the user wants to create, update, or improve a skill that extends agent capabilities with specialized knowledge, workflows, or tool integrations.
my-skill
A standalone test skill (not part of a plugin) - use for general skill testing
debugging
Systematic approach to debugging Python code - use when user encounters errors or unexpected behavior
edit-article
Edit and improve articles by restructuring sections, improving clarity, and tightening prose. Use when user wants to edit, revise, or improve an article draft.
Didn't find tool you were looking for?