testing

Generates, reviews, and executes pytest test suites for Python projects.

Updated Jul 9, 2026
One-click install
npx skills add https://github.com/ByronWilliamsCPA/plugin --skill testing-byronwilliamscpa
Or copy as Structured Prompt for Agent▼
Please help me install this Agent Skill.
Skill: testing
Source: https://github.com/ByronWilliamsCPA/plugin/tree/main/plugins/wff-code/skills/testing
Command: npx skills add https://github.com/ByronWilliamsCPA/plugin --skill testing-byronwilliamscpa

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve? Writing and maintaining high-quality pytest suites is time-consuming, and weak tests (unspec'd mocks, vague assertions, missing edge cases) let bugs slip into production. This Skill automates test generation, quality review, and execution so suites follow consistent, enforceable standards. ## Core Features & Use Cases - Test Generation: Creates pytest tests enforcing naming conventions, named parametrize ids, spec'd mocks, AsyncMock for coroutines, and full edge-case coverage (None, empty, boundary, malformed). - Test Review: Audits existing tests against a 6-item checklist covering parametrize duplication, unspec'd mocks, weak assertions, missing edge cases, naming violations, and no-exception-only tests, with concrete before/after fixes. - Specialized Testing: Provides workflows for e2e, security (OWASP Top 10), and performance testing (pytest-benchmark, pytest-memray, latency SLAs). - Use Case: Ask it to generate tests for an async FastAPI route module, and it produces a file using @pytest.mark.asyncio, AsyncMock with spec= on the injected dependency, and parametrized 404/validation scenarios. ## Quick Start Generate pytest tests for the async functions in src/api/fragrances.py covering success, 404, and validation error cases.

Frequently Asked Questions about testing

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

FAQPage Schema
How do I generate pytest tests for async Python functions?▼

Use the generate workflow, which produces tests decorated with @pytest.mark.asyncio and mocks coroutines with AsyncMock instead of MagicMock. It checks .await_count rather than .call_count and applies spec= to the actual injected dependency.

How do I review pytest test quality for weak assertions?▼

The review workflow applies a 6-item checklist covering parametrize duplication, unspec'd mocks, weak assertions like assert True or assert result is not None, missing edge cases, naming violations, and no-exception-only tests. Each finding cites the test function name with a concrete before/after fix.

Which mock library works with httpx versus requests?▼

respx mocks httpx, responses mocks requests, and aioresponses mocks aiohttp. A mismatch such as httpx implementation with @responses.activate causes tests to make real network calls or raise connection errors.

Does this skill handle coverage gap analysis?▼

No, coverage gap analysis is explicitly out of scope and delegated to the test-coverage skill, which runs an iterative generate-run-fix-review loop. This skill covers test creation, execution, and review only.

Why do my tests pass but still hide bugs with MagicMock?▼

MagicMock() without spec= silently accepts any attribute access, so typos and interface changes go undetected. Always use MagicMock(spec=SomeClass) or autospec=True, and use AsyncMock for any async def function.