MCPcopy
hub / github.com/pytest-dev/pytest / reportinfo

Method reportinfo

src/_pytest/nodes.py:740–751  ·  view source on GitHub ↗

Get location information for this item for test reports. Returns a tuple with three elements: - The path of the test (default ``self.path``) - The 0-based line number of the test (default ``None``) - A name of the test to be shown (default ``""``) .. seeals

(self)

Source from the content-addressed store, hash-verified

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.
742
743 Returns a tuple with three elements:
744
745 - The path of the test (default ``self.path``)
746 - The 0-based line number of the test (default ``None``)
747 - A name of the test to be shown (default ``""``)
748
749 .. seealso:: :ref:`non-python tests`
750 """
751 return self.path, None, ""
752
753 @cached_property
754 def location(self) -> tuple[str, int | None, str]:

Calls

no outgoing calls

Tested by 5

test_reportinfoMethod · 0.36
test_func_reportinfoMethod · 0.36
test_class_reportinfoMethod · 0.36