Bug #607435 “TextTestResult should be easier to extend” : Bugs : testtools (original) (raw)

TextTestResult should be easier to extend

This bug affects 1 person

Affects Status Importance Assigned to Milestone
testtools Triaged Wishlist Unassigned

Bug Description

Just moved bzrlib.selftest.ExtendedTestResult over from deriving from unittest._TextTestResult to testtools.TextTestResult and it was not quite as seamless as I was hoping.

The testtools class has:
* No concept of verbosity (so different __init__ arguments)
* No printErrors method, and the printErrorList equivalent is private
* No way of extending stopTestRun with more information in the final summary line

This meant rather than being able to delete duplicated logic, had to instead add to it.