It would be convenient to have a wrapper of some sort that could convert the Python unittest output to ptest compatible output. This is currently done ad-hoc with a sed line (see python3's run-ptest); creating either a wrapper for this or possibly a python test runner class that outputs the correct format directly would be useful for other ptests that are written using python unittest.
I did start a unittest subclass that reimplemented the output code to match what we expect, but I got stuck on making -mtest actually work with it. I should see if I can still find it as I suspect the -mtest problem was a complication that wouldn't impact other classes.
Ah, poky-contrib:ross/py.
Hmm. So that branch has disappeared. But, relatedly, poky-contrib:ross/tap contains recipes for a few different Py TAP implementations. Specifically pychotap 1.2.1 contains a command line unittest runner I wrote so if a Python recipe's run-ptests did this before: $ python3 -munittest foo It can now do: $ python3 -mpychotap foo And it emits nice TAP format logs. That isn't *immediately* useful for this bug but either: 1) pychotap's __main__ can serve as a template for implementing a ptest-style formatter. 2) write a TAP-to-ptest script and pipe the TAP output into it. As TAP is gaining traction (perl and gnome use it by default), (2) is arguably a good idea. Making python3 -mtest work is another battle: the Py test suite is sufficiently complex that you can't just 'python3 -munittest test' so using a different formatter isn't that easy.
Moved en masse from 4.2 to 4.3 by Randy.
The new recipe python3-unittest-automake-output (added in 961e4f3fc786715fc136fa446686972a4a95a3d5) has helpers for unittest and pytest.