Repository: pytest-dev/pytest
File: src/_pytest/reports.py (Python)

Code before:
        """**Experimental** Whether this report should be counted towards the
        totals shown at the end of the test session: "1 passed, 1 failure, etc".

        .. note::

            This function is considered **experimental**, so beware that it is subject to changes
            even in patch releases.
        """
        return True

    @property
    def head_line(self) -> Optional[str]:
        """**Experimental** The head line shown with longrepr output for this
        report, more commonly during traceback representation during
        failures::

            ________ Test.foo ________


        In the example above, the head_line is "Test.foo".

        .. note::

            This function is considered **experimental**, so beware that it is subject to changes
            even in patch releases.
        """
        if self.location is not None:
            fspath, lineno, domain = self.location
            return domain
        return None

    def _get_verbose_word(
        self, config: Config, default_markup: Mapping[str, bool]
    ) -> Tuple[str, Mapping[str, bool]]:
        _category, _short, verbose = config.hook.pytest_report_teststatus(
            report=self, config=config
        )

        if not isinstance(verbose, tuple):
            return verbose, default_markup

        return verbose[0], verbose[1]

    def _to_json(self) -> Dict[str, Any]:
        """Return the contents of this report as a dict of builtin entries,
        suitable for serialization.

        This was originally the serialize_report() function from xdist (ca03269).

        Experimental method.
        """

Review comment (suggestion):
As the method does not return a single word anymore, it should probably be renamed to reflect what it does, really. Perhaps, smth like this:
```suggestion
    def _get_verbose_word_with_markup(
```

Code after:

            This function is considered **experimental**, so beware that it is subject to changes
            even in patch releases.
        """
        return True

    @property
    def head_line(self) -> str | None:
        """**Experimental** The head line shown with longrepr output for this
        report, more commonly during traceback representation during
        failures::

            ________ Test.foo ________


        In the example above, the head_line is "Test.foo".

        .. note::

            This function is considered **experimental**, so beware that it is subject to changes
            even in patch releases.
        """
        if self.location is not None:
            fspath, lineno, domain = self.location
            return domain
        return None

    def _get_verbose_word_with_markup(
        self, config: Config, default_markup: Mapping[str, bool]
    ) -> tuple[str, Mapping[str, bool]]:
        _category, _short, verbose = config.hook.pytest_report_teststatus(
            report=self, config=config
        )

        if isinstance(verbose, str):
            return verbose, default_markup

        if isinstance(verbose, Sequence) and len(verbose) == 2:
            word, markup = verbose
            if isinstance(word, str) and isinstance(markup, Mapping):
                return word, markup

        fail(  # pragma: no cover
            "pytest_report_teststatus() hook (from a plugin) returned "
            f"an invalid verbose value: {verbose!r}.\nExpected either a string "
            "or a tuple of (word, markup)."
        )

    def _to_json(self) -> dict[str, Any]:
        """Return the contents of this report as a dict of builtin entries,
        suitable for serialization.