tdd-pytest

Solid

Python/pytest TDD specialist for test-driven development workflows. Use when writing tests, auditing test quality, running pytest, or generating test reports. Integrates with uv and pyproject.toml configuration.

Testing & QA 335 stars 29 forks Updated today

Install

View on GitHub

Quality Score: 85/100

Stars 20%
84
Recency 20%
100
Frontmatter 20%
70
Documentation 15%
100
Issue Health 10%
80
License 10%
0
Description 5%
100

Skill Content

# TDD-Pytest Skill Activate this skill when the user needs help with: - Writing tests using TDD methodology (Red-Green-Refactor) - Auditing existing pytest test files for quality - Running tests with coverage - Generating test reports to `TESTING_REPORT.local.md` - Setting up pytest configuration in `pyproject.toml` ## TDD Workflow ### Red-Green-Refactor Cycle 1. **RED** - Write a failing test first - Test should fail for the right reason (not import errors) - Test should be minimal and focused - Show the failing test output 2. **GREEN** - Write minimal code to pass - Only implement what's needed to pass the test - No premature optimization - Show the passing test output 3. **REFACTOR** - Improve code while keeping tests green - Clean up duplication - Improve naming - Extract functions/classes if needed - Run tests after each change ## Test Organization ### File Structure ```text project/ src/ module.py tests/ conftest.py # Shared fixtures test_module.py # Tests for module.py pyproject.toml # Pytest configuration ``` ### Naming Conventions - Test files: `test_*.py` or `*_test.py` - Test functions: `test_*` - Test classes: `Test*` - Fixtures: Descriptive names (`mock_database`, `sample_user`) ## Pytest Best Practices ### Fixtures ```python import pytest @pytest.fixture def sample_config(): return {"key": "value"} @pytest.fixture def mock_client(mocker): return mocker.MagicMock() ```...

Details

Author
aiskillstore
Repository
aiskillstore/marketplace
Created
5 months ago
Last Updated
today
Language
Python
License
None

Integrates with

Similar Skills

Semantically similar based on skill content — not just same category

Testing & QA Listed

pytest-patterns

Python testing skill using pytest, covering fixtures, parametrize, markers, conftest, plugins, mocking, and advanced testing patterns.

3 Updated today
KaliBellion
Testing & QA Listed

tdd

Enforces strict Test-Driven Development with RED-GREEN-REFACTOR cycles. Writes one failing test at a time, implements minimal code to pass, then refactors. Uses subagent isolation to prevent tests-by-construction. Pairs with the `code-quality` skill: invokes `Skill('code-quality')` during the REFACTOR phase to apply the full code-quality rule set against the GREEN output, and cites refactor recipes (R1–R20) by ID when reporting changes. Triggers on: "tdd", "write tests", "test this", "add test coverage", "test driven", "red green refactor", "/tdd".

4 Updated 2 days ago
mthines
Testing & QA Listed

tdd

Test-driven development workflows and red-green-refactor loops

2 Updated 4 days ago
DongDuong2001
Testing & QA Solid

python-testing

Python testing patterns: pytest setup, fixtures, TDD, mocking, async tests, and integration tests

297 Updated today
athola
Testing & QA Listed

tdd-guide

Test-driven development skill for writing unit tests, generating test fixtures and mocks, analyzing coverage gaps, and guiding red-green-refactor workflows across Jest, Pytest, JUnit, Vitest, and Mocha. Use when the user asks to write tests, improve test coverage, practice TDD, generate mocks or stubs, or mentions testing frameworks like Jest, pytest, or JUnit.

2 Updated 2 days ago
mdnaimul22