Add a new report section, similar to what's done internally to add stdout and stderr captured output:: item.add_report_section("call", "stdout", "report section contents") :param str when: One of the possible capture states, ``"setup"``, ``"call"``, ``"teard
(self, when: str, key: str, content: str)
| 721 | raise NotImplementedError("runtest must be implemented by Item subclass") |
| 722 | |
| 723 | def add_report_section(self, when: str, key: str, content: str) -> None: |
| 724 | """Add a new report section, similar to what's done internally to add |
| 725 | stdout and stderr captured output:: |
| 726 | |
| 727 | item.add_report_section("call", "stdout", "report section contents") |
| 728 | |
| 729 | :param str when: |
| 730 | One of the possible capture states, ``"setup"``, ``"call"``, ``"teardown"``. |
| 731 | :param str key: |
| 732 | Name of the section, can be customized at will. Pytest uses ``"stdout"`` and |
| 733 | ``"stderr"`` internally. |
| 734 | :param str content: |
| 735 | The full contents as a string. |
| 736 | """ |
| 737 | if content: |
| 738 | self._report_sections.append((when, key, content)) |
| 739 | |
| 740 | def reportinfo(self) -> tuple[os.PathLike[str] | str, int | None, str]: |
| 741 | """Get location information for this item for test reports. |
no test coverage detected