NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
PyPI · #4593 most downloaded on PyPI
Python implementation of subunit test streaming protocol
Last release 5 months ago
04 May 2026
Release timing varies
gaps range from 2 weeks to 2.6 years
Most releases are documented
notes for 25 of 28 stable releases
Nothing withdrawn
no release was ever pulled
16 years old
28 releases · first in 2010
Fix compatibility with testtools 2.8.2. (Jelmer Vernooij)
BUG FIXES
* Fix compatibility with testtools 2.8.2. (Jelmer Vernooij)
* Fix ``ExecTestCase`` to work without executable permissions on the
test script. (Jelmer Vernooij)
* Fix ``ExecTestCase`` to properly handle shell scripts. (Jelmer Vernooij)
IMPROVEMENTS
Stop installing tests. (Jelmer Vernooij)
Add subunit-combine script that runs multiple subunit-producing
commands and merges their streams, optionally prefixing each command's
test ids. (Jelmer Vernooij, #2150097)
subunit-combine supports testr-style $LISTOPT, $IDOPTION,
$IDFILE and $IDLIST placeholders in command argv, along with
--list, --load-list and positional test ids for per-command
filtering. (Jelmer Vernooij)
Add gojson2subunit script for converting go test -json streams
to subunit. (Jelmer Vernooij)
Add junitxml2subunit script for converting JUnit XML test reports
to subunit. (Jelmer Vernooij)
Run ruff in CI by @jelmer in https://github.com/testing-cabal/subunit/pull/74
One column per quarter.
Full Changelog: https://github.com/testing-cabal/subunit/compare/1.4.4...1.4.5
BUG FIXES
* Drop support for Python 3.9.
(Jelmer Vernooij)
* Drop use of Python26 and Python27 test cases from testtools.
These are no longer relevant and no longer provided by
modern versions of testtools. (Jelmer Vernooij)
IMPROVEMENTS
Remove use of deprecated datetime.datetime methods by @jakelishman in https://github.com/testing-cabal/subunit/pull/71
datetime.datetime methods by @jakelishman in https://github.com/testing-cabal/subunit/pull/71Full Changelog: https://github.com/testing-cabal/subunit/compare/1.4.3...1.4.4
BUG FIXES
* Removed use of deprecated "utc" and "utcfromtimestamp"
methods of "datetime.datetime". (Jake Lishman)
* Fix an issue with date parsing exception handling
(Colin Watson)
IMPROVEMENTS
Add support for Python 3.12 (Matthew Treinish)
Drop support for Python 3.7 (Jelmer Vernooij)
Subunit now has a dependency on an external iso8601 module rather than shipping its own. (Jelmer Vernooij)
IMPROVEMENTS
* Drop various compatibility wrappers for Python < 3.6.
BUG FIXES
~~~~~~~~~
* Fix "subunit-filter --fixup-expected-failures"
on Python 3. (Jelmer Vernooij)
1.4.1
IMPROVEMENTS
Add support for Python 3.9 (Thomas Grainger)
Add support for Python 3.10 (Stephen Finucane)
Drop support for Python 2.7, 3.4, and 3.5 (Stephen Finucane)
Convert python scripts to entry_points. (Matthew Treinish)
Migrate CI from travis to GitHub actions. (Matthew Treinish)
Add options to output filter to set timestamps. (Matthew Treinish)
Remove dependency on unittest2. (Matěj Cepl)
BUGFIXES
* Fix tests with testtools >= 2.5.0.
(Colin Watson)
* Mark rawstrings as such, fixing warnings.
(Stephen Finucane)
Nothing published for this version
Nothing published for this version
Drop Python 3.3 support, and test on 3.5 and 3.6. (Jelmer Vernooij)
IMPROVEMENTS
* Drop Python 3.3 support, and test on 3.5 and 3.6.
(Jelmer Vernooij)
* Add support for Python 3.7 and 3.8.
(Matthew Treinish)
* Improve readability of SubUnit v2 spec.
(Sergey Bronnikov)
* Add license to setup.py. (Sergiu)
BUGFIXES
~~~~~~~~
* Migrate Gtk interface to GObject introspection.
(Haikel Guemar)
* Fix file open for python3. (Quique Llorente)
* Check written bytes are not None before summing them to offset.
(Federico Ressi, #1845631)
* Correctly handle py3 RawIOBase read(). (Stephen Finucane, partially #1813147)
Add a --rename flag to subunit-filter. (Jelmer Vernooij, #1758522)
IMPROVEMENTS
* Add a --rename flag to subunit-filter.
(Jelmer Vernooij, #1758522)
BUGFIXES
~~~~~~~~
* Fix make_stream_binary with FileIO object inputs.
(Matthew Treinish)
* Fix v2 run() on windows platforms.
(Claudiu Belu)
Fixed handling of incomplete writes with eventlet on Python3. (Victor Stinner)
IMPROVEMENTS
* Fixed handling of incomplete writes with eventlet on Python3.
(Victor Stinner)
* Added subunit2disk, which explodes a stream out to files on disk.
(Robert Collins)
Unencapsulated strings and encapsulated stdout will be forwarded by subunit-2to1. (Robert Collins, #1400519)
BUGFIXES
* Unencapsulated strings and encapsulated stdout will be forwarded by
subunit-2to1. (Robert Collins, #1400519)
* SUBUNIT_FORMATTER which has not been honoured for years is now removed from
the codebase. (Jelmer Vernooij)
IMPROVEMENTS
subunit.run now supports --locals to show local variables in
tracebacks. (Robert Collins)Tests have been fixed with testtools 1.2.0 and above. (Robert Collins)
BUGFIXES
* Tests have been fixed with testtools 1.2.0 and above.
(Robert Collins)
IMPROVEMENTS
subunit.run. (Robert Collins)Brown bag bugfix - 0.0.20's setup.py referenced cvs not csv. (Robert Collins, #1361924)
BUGFIXES
* Brown bag bugfix - 0.0.20's setup.py referenced cvs not csv.
(Robert Collins, #1361924)
subunit2csv is now installed when using pip. (Robert Collins, #1279669)
BUGFIXES
* subunit2csv is now installed when using pip.
(Robert Collins, #1279669)
* testscenarios is now a test dependency, not an install dependency.
(Arfrever Frehtes Taifersar Arahesis, #1292757)
* The python-subunit tarball can now have setup run from the current
directory. (Robert Collins, #1361857)
subunit.run in Python will now exit 0 as long as the test stream has been generated correctly - this has always been the intent but API friction with
IMPROVEMENTS
* ``subunit.run`` in Python will now exit 0 as long as the test stream has
been generated correctly - this has always been the intent but API friction
with testtools had prevented it working.
(Robert Collins)
Fix compatibility with testtools 0.9.35 which dropped the 'all' compat symbol. This breaks support for Python versions lower than 2.6. (Robert Collins
IMPROVEMENTS
* Fix compatibility with testtools 0.9.35 which dropped the 'all' compat
symbol. This breaks support for Python versions lower than 2.6.
(Robert Collins, #1274056)
Add subunit-output tool that can generate a Subunit v2 bytestream from arguments passed on the command line. (Thomi Richards, #1252084)
IMPROVEMENTS
* Add ``subunit-output`` tool that can generate a Subunit v2 bytestream from
arguments passed on the command line. (Thomi Richards, #1252084)
Perl files should now honour perl system config. (Benedikt Morbach, #1233198)
BUG FIXES
* Perl files should now honour perl system config.
(Benedikt Morbach, #1233198)
* Python 3.1 and 3.2 have an inconsistent memoryview implementation which
required a workaround for NUL byte detection. (Robert Collins, #1216246)
* The test suite was failing 6 tests due to testtools changing it's output
formatting of exceptions. (Robert Collins)
* V2 parser errors now set appropriate mime types for the encapsulated packet
data and the error message. (Robert Collins)
* When tests fail to import ``python subunit.run -l ...`` will now write a
subunit file attachment listing the failed imports and exit 2, rather than
listing the stub objects from the importer and exiting 0.
(Robert Collins, #1245672)
IMPROVEMENTS
Clients of subunit did not expect memoryview objects in StreamResult events. (Robert Collins)
BUG FIXES
* Clients of subunit did not expect memoryview objects in StreamResult events.
(Robert Collins)
* Memoryview and struct were mutually incompatible in 2.7.3 and 3.2.
(Robert Collins, #1216163)
Memoryview detection was broken and thus it's use was never really tested. (Robert Collins, 1216101)
BUG FIXES
* Memoryview detection was broken and thus it's use was never really tested.
(Robert Collins, 1216101)
* TestProtocol2's tag tests were set sort order dependent.
(Robert Collins, #1025392)
* TestTestProtocols' test_tags_both was set sort order dependent.
(Robert Collins, #1025392)
* TestTestProtocols' test_*_details were dictionary sort order dependent.
(Robert Collins, #1025392)
* TestSubUnitTags's test_add_tag was also se sort order dependent.
(Robert Collins, #1025392)
subunit should now build with automake 1.11 again. (Robert Collins)
IMPROVEMENTS
* subunit should now build with automake 1.11 again. (Robert Collins)
* `subunit-stats` no longer outputs encapsulated stdout as subunit.
(Robert Collins, #1171987)
* The logic for `subunit.run` is now importable via python -
`subunit.run.main`. (Robert Collins, #606770)
BUG FIXES
~~~~~~~~~
* Removed GPL files that were (C) non Subunit Developers - they are
incompatible for binary distribution, which affects redistributors.
(Robert Collins, #1185591)
Subunit v2 packets with both file content and route code were not being parsed correctly - they would incorrectly emit a parser error, due to trying t
BUG FIXES
* Subunit v2 packets with both file content and route code were not being
parsed correctly - they would incorrectly emit a parser error, due to trying
to parse the route code length from the first byes of the file content.
(Robert Collins, 1172815)
v2 protocol draft included in this release. The v2 protocol trades off human readability for a massive improvement in robustness, the ability to repre
v2 protocol draft included in this release. The v2 protocol trades off human readability for a massive improvement in robustness, the ability to represent concurrent tests in a single stream, cheaper parsing, and that provides significantly better in-line debugging support and structured forwarding of non-test data (such as stdout or stdin data).
This change includes two new filters (subunit-1to2 and subunit-2to1). Use these filters to convert old streams to v2 and convert v2 streams to v1.
All the other filters now only parse and emit v2 streams. V2 is still in draft format, so if you want to delay and wait for v2 to be finalised, you should use subunit-2to1 before any serialisation steps take place. With the ability to encapsulate multiple non-test streams, another significant change is that filters which emit subunit now encapsulate any non-subunit they encounter, labelling it 'stdout'. This permits multiplexing such streams and detangling the stdout streams from each input.
The subunit libraries (Python etc) have not changed their behaviour: they still emit v1 from their existing API calls. New API's are being added and applications should migrate once their language has those API's available.
IMPROVEMENTS
* ``subunit.run`` now replaces sys.stdout to ensure that stdout is unbuffered
- without this pdb output is not reliably visible when stdout is a pipe
as it usually is. (Robert Collins)
* v2 protocol draft included in this release. (Python implementation only so
far). (Robert Collins)
* Two new Python classes -- ``StreamResultToBytes`` and
``ByteStreamToStreamResult`` handle v2 generation and parsing.
(Robert Collins)
make_stream_binary is now public for reuse. (Robert Collins)
BUG FIXES
* make_stream_binary is now public for reuse. (Robert Collins)
* NAME was not defined in the protocol BNF. (Robert Collins)
* UnsupportedOperation is available in the Python2.6 io library, so ask
forgiveness rather than permission for obtaining it. (Robert Collins)
* Streams with no fileno() attribute are now supported, but they are not
checked for being in binary mode: be sure to take care of that if using
the library yourself. (Robert Collins)
All the source files are now included in the distribution tarball. (Arfrever Frehtes Taifersar Arahesis, Robert Collins, #996275)
BUG FIXES
* All the source files are now included in the distribution tarball.
(Arfrever Frehtes Taifersar Arahesis, Robert Collins, #996275)
* ``python/subunit/tests/test_run.py`` and ``python/subunit/filters.py`` were
not included in the 0.0.8 tarball. (Robert Collins)
* Test ids which include non-ascii unicode characters are now supported.
(Robert Collins, #1029866)
* The ``failfast`` option to ``subunit.run`` will now work. The dependency on
testtools has been raised to 0.9.23 to permit this.
(Robert Collins, #1090582)
Perl module now correctly outputs "failure" instead of "fail". (Stewart Smith)
IMPROVEMENTS
* Perl module now correctly outputs "failure" instead of "fail". (Stewart Smith)
* Shell functions now output timestamps. (Stewart Smith, Robert Collins)
* 'subunit2csv' script that converts subunit output to CSV format.
(Jonathan Lange)
* ``TagCollapsingDecorator`` now correctly distinguishes between local and
global tags. (Jonathan Lange)
* ``TestResultFilter`` always forwards ``time:`` events.
(Benji York, Brad Crittenden)
BUG FIXES
~~~~~~~~~
* Add 'subunit --no-xfail', which will omit expected failures from the subunit
stream. (John Arbash Meinel, #623642)
* Add 'subunit -F/--only-genuine-failures' which sets all of '--no-skips',
'--no-xfail', '--no-passthrough, '--no-success', and gives you just the
failure stream. (John Arbash Meinel)
* Python2.6 support was broken by the fixup feature.
(Arfrever Frehtes Taifersar Arahesis, #987490)
* Python3 support regressed in trunk.
(Arfrever Frehtes Taifersar Arahesis, #987514)
* Python3 support was insufficiently robust in detecting unicode streams.
(Robert Collins, Arfrever Frehtes Taifersar Arahesis)
* Tag support has been implemented for TestProtocolClient.
(Robert Collins, #518016)
* Tags can now be filtered. (Jonathan Lange, #664171)
* Test suite works with latest testtools (but not older ones - formatting
changes only). (Robert Collins)
The Subunit Python test runner python -m subunit.run can now report the test ids and also filter via a test id list file thanks to improvements in tes
The Subunit Python test runner python -m subunit.run can now report the
test ids and also filter via a test id list file thanks to improvements in
testtools.run. See the testtools manual, or testrepository - a major
user of such functionality.
Additionally the protocol now has a keyword uxsuccess for Unexpected Success reporting. Older parsers will report tests with this status code as 'lost connection'.
IMPROVEMENTS
* Add ``TimeCollapsingDecorator`` which collapses multiple sequential time()
calls into just the first and last. (Jonathan Lange)
* Add ``TagCollapsingDecorator`` which collapses many tags() calls into one
where possible. (Jonathan Lange, Robert Collins)
* Force flush of writes to stdout in c/tests/test_child.
(Jelmer Vernooij, #687611)
* Provisional Python 3.x support.
(Robert Collins, Tres Seaver, Martin[gz], #666819)
* ``subunit.chunked.Decoder`` Python class takes a new ``strict`` option,
which defaults to ``True``. When ``False``, the ``Decoder`` will accept
incorrect input that is still unambiguous. i.e. subunit will not barf if
a \r is missing from the input. (Martin Pool)
* ``subunit-filter`` preserves the relative ordering of ``time:`` statements,
so you can now use filtered streams to gather data about how long it takes
to run a test. (Jonathan Lange, #716554)
* ``subunit-ls`` now handles a stream with time: instructions that start
partway through the stream (which may lead to strange times) more gracefully.
(Robert Collins, #785954)
* ``subunit-ls`` should handle the new test outcomes in Python2.7 better.
(Robert Collins, #785953)
* ``TestResultFilter`` now collapses sequential calls to time().
(Jonathan Lange, #567150)
* ``TestResultDecorator.tags()`` now actually works, and is no longer a buggy
copy/paste of ``TestResultDecorator.time()``. (Jonathan Lange, #681828)
* ``TestResultFilter`` now supports a ``fixup_expected_failures``
argument. (Jelmer Vernooij, #755241)
* The ``subunit.run`` Python module supports ``-l`` and ``--load-list`` as
per ``testtools.run``. This required a dependency bump due to a small
API change in ``testtools``. (Robert Collins)
* The help for subunit-filter was confusing about the behaviour of ``-f`` /
``--no-failure``. (Robert Collins, #703392)
* The Python2.7 / testtools addUnexpectedSuccess API is now supported. This
required adding a new status code to the protocol. (Robert Collins, #654474)
CHANGES
~~~~~~~
* testtools 0.9.11 or newer is new needed (due to the Python 3 support).
(Robert Collins)
This release of subunit fixes a number of unicode related bugs. This depends on testtools 0.9.4 and will not function without it. Thanks to Tres Seave
This release of subunit fixes a number of unicode related bugs. This depends on testtools 0.9.4 and will not function without it. Thanks to Tres Seaver there is also an optional native setup.py file for use with easy_install and the like.
BUG FIXES
* Be consistent about delivering unicode content to testtools StringException
class which has become (appropriately) conservative. (Robert Collins)
* Fix incorrect reference to subunit_test_failf in c/README.
(Brad Hards, #524341)
* Fix incorrect ordering of tags method parameters in TestResultDecorator. This
is purely cosmetic as the parameters are passed down with no interpretation.
(Robert Collins, #537611)
* Old style tracebacks with no encoding info are now treated as UTF8 rather
than some-random-codec-like-ascii. (Robert Collins)
* On windows, ProtocolTestCase and TestProtocolClient will set their streams to
binary mode by calling into msvcrt; this avoids having their input or output
mangled by the default line ending translation on that platform.
(Robert Collins, Martin [gz], #579296)
IMPROVEMENTS
Subunit now has a setup.py for python deployments that are not using distribution packages. (Tres Seaver, #538181)
Subunit now supports test discovery by building on the testtools support for it. You can take advantage of it with "python -m subunit.run discover [path]" and see "python -m subunit.run discover --help" for more options.
Subunit now uses the improved unicode support in testtools when outputting non-details based test information; this should consistently UTF8 encode such strings.
The Python TestProtocolClient now flushes output on startTest and stopTest. (Martin [gz]).
Nothing published for this version
Your coding agent can read these notes before it upgrades. Set up the MCP server →