Rename to "TestShortLogReport"
This commit is contained in:
parent
34d61487d4
commit
38f62ef6cd
|
@ -956,10 +956,10 @@ TestReport
|
||||||
:show-inheritance:
|
:show-inheritance:
|
||||||
:inherited-members:
|
:inherited-members:
|
||||||
|
|
||||||
TestStatus
|
TestShortLogReport
|
||||||
~~~~~~~~~~
|
~~~~~~~~~~
|
||||||
|
|
||||||
.. autoclass:: pytest.TestStatus()
|
.. autoclass:: pytest.TestShortLogReport()
|
||||||
:members:
|
:members:
|
||||||
|
|
||||||
_Result
|
_Result
|
||||||
|
|
|
@ -40,7 +40,7 @@ if TYPE_CHECKING:
|
||||||
from _pytest.reports import TestReport
|
from _pytest.reports import TestReport
|
||||||
from _pytest.runner import CallInfo
|
from _pytest.runner import CallInfo
|
||||||
from _pytest.terminal import TerminalReporter
|
from _pytest.terminal import TerminalReporter
|
||||||
from _pytest.terminal import TestStatus
|
from _pytest.terminal import TestShortLogReport
|
||||||
from _pytest.compat import LEGACY_PATH
|
from _pytest.compat import LEGACY_PATH
|
||||||
|
|
||||||
|
|
||||||
|
@ -806,7 +806,7 @@ def pytest_report_collectionfinish( # type:ignore[empty-body]
|
||||||
@hookspec(firstresult=True)
|
@hookspec(firstresult=True)
|
||||||
def pytest_report_teststatus( # type:ignore[empty-body]
|
def pytest_report_teststatus( # type:ignore[empty-body]
|
||||||
report: Union["CollectReport", "TestReport"], config: "Config"
|
report: Union["CollectReport", "TestReport"], config: "Config"
|
||||||
) -> "TestStatus":
|
) -> "TestShortLogReport":
|
||||||
"""Return result-category, shortletter and verbose word for status
|
"""Return result-category, shortletter and verbose word for status
|
||||||
reporting.
|
reporting.
|
||||||
|
|
||||||
|
|
|
@ -113,7 +113,7 @@ class MoreQuietAction(argparse.Action):
|
||||||
namespace.quiet = getattr(namespace, "quiet", 0) + 1
|
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.
|
"""Used to store the test status result category, shortletter and verbose word.
|
||||||
For example ``"rerun", "R", ("RERUN", {"yellow": True})``.
|
For example ``"rerun", "R", ("RERUN", {"yellow": True})``.
|
||||||
|
|
||||||
|
@ -565,7 +565,7 @@ class TerminalReporter:
|
||||||
self._tests_ran = True
|
self._tests_ran = True
|
||||||
rep = report
|
rep = report
|
||||||
|
|
||||||
res = TestStatus(
|
res = TestShortLogReport(
|
||||||
*self.config.hook.pytest_report_teststatus(report=rep, config=self.config)
|
*self.config.hook.pytest_report_teststatus(report=rep, config=self.config)
|
||||||
)
|
)
|
||||||
category, letter, word = res.category, res.letter, res.word
|
category, letter, word = res.category, res.letter, res.word
|
||||||
|
|
Loading…
Reference in New Issue