Fix compatibility with subunit >= 1.4.3

The subunit.test_results module is no longer imported by the top-level
subunit module and we have to explicitly import it.

This also fixes the broken doc build caused by the history.rst file.
The change log is now maintained differently so we don't need it
any more.

Closes-Bug: #2045766
Change-Id: Iae1ae0c55b8e1660a2bb41379a1f8f8506679cca
This commit is contained in:
Takashi Kajinami 2023-12-20 22:59:43 +09:00
parent 204fe38386
commit a4876f6d6d
3 changed files with 2 additions and 3 deletions

View File

@ -1 +0,0 @@
.. include:: ../../../ChangeLog

View File

@ -10,4 +10,3 @@ This section contains the documentation for each of tools packaged in os-testr
subunit_trace
subunit2html
generate_subunit
history

View File

@ -27,6 +27,7 @@ import sys
import pbr.version
import subunit
from subunit import test_results
import testtools
from os_testr.utils import colorizer
@ -364,7 +365,7 @@ def trace(stdin, stdout, print_failures=False, failonly=False,
summary = testtools.StreamSummary()
result = testtools.CopyStreamResult([outcomes, summary])
result = testtools.StreamResultRouter(result)
cat = subunit.test_results.CatFiles(stdout)
cat = test_results.CatFiles(stdout)
result.add_rule(cat, 'test_id', test_id=None)
start_time = datetime.datetime.utcnow()
result.startTestRun()