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

Method __init__

src/_pytest/nodes.py:655–682  ·  view source on GitHub ↗
(
        self,
        name,
        parent=None,
        config: Config | None = None,
        session: Session | None = None,
        nodeid: str | None = None,
        **kw,
    )

Source from the content-addressed store, hash-verified

653 nextitem = None
654
655 def __init__(
656 self,
657 name,
658 parent=None,
659 config: Config | None = None,
660 session: Session | None = None,
661 nodeid: str | None = None,
662 **kw,
663 ) -> None:
664 # The first two arguments are intentionally passed positionally,
665 # to keep plugins who define a node type which inherits from
666 # (pytest.Item, pytest.File) working (see issue #8435).
667 # They can be made kwargs when the deprecation above is done.
668 super().__init__(
669 name,
670 parent,
671 config=config,
672 session=session,
673 nodeid=nodeid,
674 **kw,
675 )
676 self._report_sections: list[tuple[str, str, str]] = []
677
678 #: A list of tuples (name, value) that holds user defined properties
679 #: for this test.
680 self.user_properties: list[tuple[str, object]] = []
681
682 self._check_item_and_collector_diamond_inheritance()
683
684 def _check_item_and_collector_diamond_inheritance(self) -> None:
685 """

Callers

nothing calls this directly

Tested by

no test coverage detected