pytest-describe
Describe-style plugin for pytest
Decision gist · record as of 2026-08-14
Yes. The plugin is actively maintained, has no known vulnerabilities, low install friction, and solves a real organizational problem for test suites. It's particularly valuable if your tests have multiple cases per function and you prefer hierarchy over long naming conventions. The MIT license imposes no restrictions.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later
- Low friction: pure Python wheel with only pytest as a runtime dependency.
- Actively maintained with a recent release 63 days ago and steady repository activity.
License · maintenance · safety
MIT (permissive) — MIT license permits unrestricted use, modification, and distribution in both open and proprietary projects with minimal restrictions.
last release 2026-06-12 (63 days) · last repo commit 2026-06-13 · 238 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,170,995 downloads/mo, #4,270 on PyPI
Alternatives
Verify before relying
pip install pytest-describe
import pytest
def describe_wallet():
def with_starting_balance():
@pytest.fixture
def wallet():
return Wallet(20)
def initial_amount(wallet):
assert wallet.balance == 20- Whether shared behaviors (behaves_like) work correctly with all pytest fixture scopes and parametrization patterns
- Performance impact of nested describe-blocks on test collection time for large test suites
What it is and what it does
pytest-describe is a pytest plugin that lets you write tests using nested describe-blocks instead of flat test functions or test classes. Rather than naming each test to encode both the function being tested and the case (like `test_my_function_with_default_arguments`), you nest functions inside describe-blocks to create a hierarchy that mirrors your code structure. This reduces naming overhead and allows fixtures and marks to apply locally to groups of related tests.
The plugin works by recognizing functions prefixed with `describe_` (configurable) as test containers and collecting nested functions as individual tests. It supports pytest fixtures as describe-block arguments, shared behaviors similar to RSpec's shared examples, helper functions prefixed with underscore, and optional docstring-based naming for clearer test reports. It requires Python 3.10 or later and integrates transparently with pytest's standard collection and execution.
Use it for
- Organizing tests for a class with multiple methods by creating nested describe-blocks for each method and cases within
- Sharing common test patterns across multiple test subjects using the behaves_like decorator
- Reducing test function name length and complexity by using describe hierarchy instead of long descriptive names
- Applying fixtures and marks to groups of related tests without repeating them in every test function
- Writing test suites that closely mirror the structure of the code being tested for easier navigation
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
The plugin is actively maintained, has no known vulnerabilities, low install friction, and solves a real organizational problem for test suites. It's particularly valuable if your tests have multiple cases per function and you prefer hierarchy over long naming conventions. The MIT license imposes no restrictions.
Install
pytest-describe on PyPI
Before you install
Low friction: pure Python wheel with only pytest as a runtime dependency. Actively maintained with a recent release 63 days ago and steady repository activity.
Requires Python 3.10 or later
License in practice
MIT license permits unrestricted use, modification, and distribution in both open and proprietary projects with minimal restrictions.
Quickstart
pip install pytest-describe
import pytest
def describe_wallet():
def with_starting_balance():
@pytest.fixture
def wallet():
return Wallet(20)
def initial_amount(wallet):
assert wallet.balance == 20
Verify before relying
- Whether shared behaviors (behaves_like) work correctly with all pytest fixture scopes and parametrization patterns
- Performance impact of nested describe-blocks on test collection time for large test suites
Package facts
| License | MIT permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 1 packagepytest |
| Maintenance | Actively maintained 63 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,170,995 / month, #4,270 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Development Status :: 5 - Production/StableFramework :: PytestIntended Audience :: DevelopersLicense :: OSI Approved :: MIT LicenseOperating System :: MacOS :: MacOS XOperating System :: Microsoft :: WindowsOperating System :: POSIXProgramming Language :: Python :: 3Programming Language :: Python :: 3 :: OnlyProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: LibrariesTopic :: Software Development :: TestingTopic :: UtilitiesTyping :: Typed |
Evidence: pytest_describe-3.2.0-py3-none-any.whl
Tags
Let your AI agent find packages like this
Example. Real query, live index.
You found this page by searching. An agent finds it by wishing: SkillFed indexes 14,416 PyPI packages by what they can do, searchable in plain language.
wish › “pytest nested describe blocks”
- pytest-describeA pytest plugin that organizes tests into nested describe-blocks,…
- pytest-codeblocksA pytest plugin that automatically discovers and runs Python and…
- pytest-markdown-docsA pytest plugin that executes Python code snippets embedded in…
Give your agent the search over MCP, or paste the wish link into any chat.
More Libraries packages
urllib3 is an HTTP client library that provides thread-safe connection pooling, SSL/TLS verification, multipart file uploads, request retries, compression support, and proxy handling for Python applications.
Requests is a Python HTTP library that simplifies sending HTTP/1.1 requests with automatic handling of headers, authentication, cookies, and response parsing.
Pluggy provides a plugin system that lets you define hook specifications and register implementations to be called in sequence, enabling extensible Python applications without tight coupling.
Install it if you're building an extensible application or framework.
Provides parsing, arithmetic, and recurrence rule computation for dates and times, with timezone support and iCalendar RFC compliance.
Install it if you need to parse flexible date strings, compute relative dates, handle timezones, or work with recurrence rules—it's the de facto choice for these tasks.
Six provides utility functions to write Python code that runs on both Python 2.7 and Python 3.3+, smoothing over language differences between the two versions.
pytest is a testing framework that lets you write test functions using plain assert statements and automatically discovers and runs them, with detailed failure reporting.
See also pytest-markdown-docs · pytest-integration · pytest-cases · pytest-lazy-fixtures · pytest-datadir · pytest-container · pytest-beartype-tests · pytest-codeblocks · pytest-docker