pytest-spec
Library pytest-spec is a pytest plugin to display test execution output like a SPECIFICATION.
Decision gist · record as of 2026-08-14
Yes. Low install friction, no dependencies, actively maintained, supports modern Python versions, and zero known vulnerabilities. The GPL-2.0-or-later license is the only consideration—verify compatibility with your project's licensing before adopting. Useful for teams that want test output to serve as readable documentation.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.9 or later.
- pytest must be installed and your tests must be discoverable by pytest.
- Low install friction with no runtime dependencies.
License · maintenance · safety
GPL-2.0-or-later (copyleft) — Licensed under GPL-2.0-or-later (copyleft). Any derivative work or distribution must comply with GPL-2.0 terms; review your project's license compatibility before adopting.
last release 2026-05-17 (89 days) · last repo commit 2026-05-17 · 116 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 212,637 downloads/mo, #9,452 on PyPI
Alternatives
Verify before relying
pip install pytest-spec
Then run pytest normally:
pytest
Optionally configure in pytest.ini or pyproject.toml:
[tool.pytest.ini_options]
spec_header_format = "{module_path}:"
spec_test_format = "{result} {name}"- Whether the plugin works with all pytest plugins or has known incompatibilities.
- Performance impact on test suites with many tests or complex hierarchies.
What it is and what it does
pytest-spec is a pytest plugin that changes how test results are displayed in the terminal. Instead of the default pytest output, it formats results to resemble a specification document, grouping tests by file and class, replacing underscores and test_ prefixes with readable names, and marking pass/fail/skip status with configurable indicators and colors.
The plugin is designed for teams that want test output to double as living documentation. It supports function-based, class-based, and describe-style tests, and allows extensive customization through pytest configuration files (pytest.ini or pyproject.toml) to control header format, test name display, status indicators, indentation, and filtering of unwanted output.
Use it for
- Display test results as readable specification output during development and CI/CD pipelines.
- Replace test_ prefixes and underscores with human-readable names automatically in test output.
- Group and organize test results hierarchically by module, class, and describe blocks.
- Customize test result indicators (✓, ✗, ») and formatting to match team documentation standards.
- Filter out noise from other pytest plugins (e.g., FLAKE8, ISORT) in spec output.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Low install friction, no dependencies, actively maintained, supports modern Python versions, and zero known vulnerabilities. The GPL-2.0-or-later license is the only consideration—verify compatibility with your project's licensing before adopting. Useful for teams that want test output to serve as readable documentation.
Install
pytest-spec on PyPI
Before you install
Low install friction with no runtime dependencies. The package is actively maintained with a recent release (89 days ago) and supports current Python versions (3.9 through 3.14).
Requires Python 3.9 or later. pytest must be installed and your tests must be discoverable by pytest.
License in practice
Licensed under GPL-2.0-or-later (copyleft). Any derivative work or distribution must comply with GPL-2.0 terms; review your project's license compatibility before adopting.
Quickstart
pip install pytest-spec
Then run pytest normally:
pytest
Optionally configure in pytest.ini or pyproject.toml:
[tool.pytest.ini_options]
spec_header_format = "{module_path}:"
spec_test_format = "{result} {name}"
Verify before relying
- Whether the plugin works with all pytest plugins or has known incompatibilities.
- Performance impact on test suites with many tests or complex hierarchies.
Package facts
| License | GPL-2.0-or-later copyleft |
| Python support | Supports the current Python release >=3.9 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | None |
| Maintenance | Actively maintained 89 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 212,637 / month, #9,452 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Operating 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 :: Utilities |
Evidence: pytest_spec-6.1.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 › “test specification display”
- pytest-specpytest-spec is a pytest plugin that reformats test output to display…
- http-sfvParses and serializes HTTP Structured Field Values according to the…
- pytest-xvfbA pytest plugin that automatically runs tests with Xvfb (or…
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-pspec · pytest-custom-report · pytest-pytestrail · pytest-run-parallel · pytest-reverse · tdd-guard-pytest · pytest-reporter · pytest-socket · pytest-opentelemetry · pytest-describe