Rename to "TestShortLogReport"

This commit is contained in:
Roberto Aldera 2023-05-17 07:27:08 +02:00
parent 34d61487d4
commit 38f62ef6cd
No known key found for this signature in database
3 changed files with 6 additions and 6 deletions

View File

@ -956,10 +956,10 @@ TestReport
:show-inheritance:
:inherited-members:
TestStatus
TestShortLogReport
~~~~~~~~~~
.. autoclass:: pytest.TestStatus()
.. autoclass:: pytest.TestShortLogReport()
:members:
_Result

View File

@ -40,7 +40,7 @@ if TYPE_CHECKING:
from _pytest.reports import TestReport
from _pytest.runner import CallInfo
from _pytest.terminal import TerminalReporter
from _pytest.terminal import TestStatus
from _pytest.terminal import TestShortLogReport
from _pytest.compat import LEGACY_PATH
@ -806,7 +806,7 @@ def pytest_report_collectionfinish( # type:ignore[empty-body]
@hookspec(firstresult=True)
def pytest_report_teststatus( # type:ignore[empty-body]
report: Union["CollectReport", "TestReport"], config: "Config"
) -> "TestStatus":
) -> "TestShortLogReport":
"""Return result-category, shortletter and verbose word for status
reporting.

View File

@ -113,7 +113,7 @@ class MoreQuietAction(argparse.Action):
namespace.quiet = getattr(namespace, "quiet", 0) + 1
class TestStatus(NamedTuple):
class TestShortLogReport(NamedTuple):
"""Used to store the test status result category, shortletter and verbose word.
For example ``"rerun", "R", ("RERUN", {"yellow": True})``.
@ -565,7 +565,7 @@ class TerminalReporter:
self._tests_ran = True
rep = report
res = TestStatus(
res = TestShortLogReport(
*self.config.hook.pytest_report_teststatus(report=rep, config=self.config)
)
category, letter, word = res.category, res.letter, res.word