python-subunit
Python implementation of subunit test streaming protocol
Decision gist · record as of 2026-08-14
Yes. Subunit is actively maintained, has no known vulnerabilities, installs with low friction, and is licensed permissively. Install it if you need to aggregate, multiplex, or serialize test results across distributed or parallel test runs, or if you're integrating tests from multiple languages or frameworks. Skip it if your testing stays within a single process or framework without cross-language aggregation needs.AI-flagged interpretation of the facts on this page — verify before relying
Before you install
- Requires Python 3.10 or later; depends on iso8601, PyYAML, and testtools at runtime.
- Low friction install with a pure-Python wheel.
- Active maintenance with recent commits and support for current Python versions (3.10–3.14).
License · maintenance · safety
Apache-2.0 or BSD (permissive) — Dual-licensed under Apache-2.0 or BSD (user's choice), both permissive licenses with no copyleft obligations. You may use, modify, and distribute freely under either license terms.
last release 2026-05-04 (102 days) · last repo commit 2026-06-04 · 31 stars
0 known vulnerabilities (OSV.dev, 2026-08-14) · 1,282,582 downloads/mo, #4,115 on PyPI
Alternatives
Verify before relying
pip install python-subunit
import subunit
from subunit import StreamResultToDict
# Parse a subunit stream
result_dict = StreamResultToDict()
# Feed stream data to result_dict and extract test results- Whether the package includes command-line filters (tap2subunit, subunit2csv, etc.) mentioned in the description or if those are separate tools.
- Whether GTK and JUnit XML conversion features are available in the Python bindings or require additional setup.
- Current state of protocol version 2 implementation and stability relative to version 1.
What it is and what it does
Subunit is a Python implementation of a streaming protocol for test results designed to handle distributed, parallel, and cross-language test execution. It models xUnit-style test outcomes (start, pass/fail, finish) and extends them with test enumeration, tagging, file attachments, and timestamps. The protocol comes in two versions: Version 1 (human-readable but with buffering and corruption issues in parallel scenarios) and Version 2 (binary, packet-based, designed for multiplexing without excessive buffering and with recovery mechanisms for corrupted streams).
The package provides Python bindings to emit and consume subunit streams, making it useful for aggregating test results from separate processes, languages, or machines into a single unified stream. It includes filters and tools to convert between subunit and other formats (CSV, JUnit XML, TAP), and integrates with Python's unittest framework via the subunit.run module. Dependencies on iso8601, PyYAML, and testtools keep the core lightweight while supporting timestamp parsing, configuration, and test result modeling.
Use it for
- Aggregate test results from multiple test runners or languages into a single stream for centralized reporting.
- Run isolated test suites in separate processes and combine their results without interference using subunit's multiplexing.
- Archive and replay test runs by recording subunit streams and replaying them later for analysis or debugging.
- Distribute test execution across multiple machines and collect results in real time via a subunit stream.
- Convert test results between formats (e.g., TAP to subunit, subunit to JUnit XML) using the protocol's filters.
Worth the install?
AI-flagged interpretation of the facts on this page. Verify before relying on it.
Yes.
Subunit is actively maintained, has no known vulnerabilities, installs with low friction, and is licensed permissively. Install it if you need to aggregate, multiplex, or serialize test results across distributed or parallel test runs, or if you're integrating tests from multiple languages or frameworks. Skip it if your testing stays within a single process or framework without cross-language aggregation needs.
Install
python-subunit on PyPI
Before you install
Low friction install with a pure-Python wheel. Active maintenance with recent commits and support for current Python versions (3.10–3.14). Three lightweight runtime dependencies (iso8601, PyYAML, testtools) are all stable, widely-used libraries.
Requires Python 3.10 or later; depends on iso8601, PyYAML, and testtools at runtime.
License in practice
Dual-licensed under Apache-2.0 or BSD (user's choice), both permissive licenses with no copyleft obligations. You may use, modify, and distribute freely under either license terms.
Quickstart
pip install python-subunit
import subunit
from subunit import StreamResultToDict
# Parse a subunit stream
result_dict = StreamResultToDict()
# Feed stream data to result_dict and extract test results
Verify before relying
- Whether the package includes command-line filters (tap2subunit, subunit2csv, etc.) mentioned in the description or if those are separate tools.
- Whether GTK and JUnit XML conversion features are available in the Python bindings or require additional setup.
- Current state of protocol version 2 implementation and stability relative to version 1.
Package facts
| License | Apache-2.0 or BSD permissive |
| Python support | Supports the current Python release >=3.10 |
| Install friction | Low. Pure-Python wheel |
| Runtime dependencies | 3 packagesiso8601PyYAMLtesttools |
| Maintenance | Actively maintained 102 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 1,282,582 / month, #4,115 on PyPI 30-day window, as of 2026-08-14 |
| Known vulnerabilities | None known OSV.dev, checked 2026-08-14 |
| Classifiers | Intended Audience :: DevelopersOperating System :: OS IndependentProgramming Language :: PythonProgramming Language :: Python :: 3.10Programming Language :: Python :: 3.11Programming Language :: Python :: 3.12Programming Language :: Python :: 3.13Programming Language :: Python :: 3.14Topic :: Software Development :: Testing |
Evidence: python_subunit-1.4.6-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 result streaming protocol”
- python-subunitSubunit is a streaming protocol library for test results that…
- pytest-tappytest-tap outputs test results in Test Anything Protocol (TAP)…
- pytest-reportlogWrites pytest test results to a JSON Lines file in real-time,…
Give your agent the search over MCP, or paste the wish link into any chat.
More Testing packages
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.
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.
virtualenv creates isolated Python environments where packages can be installed independently without affecting the system Python or other projects.
Coverage.py measures which lines of Python code are executed during test runs, reporting coverage percentages and identifying untested code paths.
Install it if you want to measure test completeness or enforce coverage thresholds in your project.
pytest-asyncio is a pytest plugin that enables writing and running async test functions using the asyncio library, allowing developers to await code directly within test cases.
Install it if you write tests for any asyncio-based code.
A pytest plugin that generates test reports in Common Test Report Format (CTRF) as JSON, compatible with pytest-xdist and pytest-playwright for distributed and browser-based testing.
Install it if you need CTRF-formatted test output for CI/CD integration or cross-tool reporting.
See also os-testr · stestr · unittest-xml-reporting · base64io · xunitparser · junit2html · junit-xml-2 · concurrencytest · junitparser · xmlrunner