MCPcopy Create free account
hub / github.com/pytest-dev/pytest / __init__

Method __init__

src/_pytest/python.py:644–666  ·  view source on GitHub ↗
(
        self,
        fspath: Optional[LEGACY_PATH],
        parent: nodes.Collector,
        # NOTE: following args are unused:
        config=None,
        session=None,
        nodeid=None,
        path=Optional[Path],
    )

Source from the content-addressed store, hash-verified

642
643class Package(Module):
644 def __init__(
645 self,
646 fspath: Optional[LEGACY_PATH],
647 parent: nodes.Collector,
648 # NOTE: following args are unused:
649 config=None,
650 session=None,
651 nodeid=None,
652 path=Optional[Path],
653 ) -> None:
654 # NOTE: Could be just the following, but kept as-is for compat.
655 # nodes.FSCollector.__init__(self, fspath, parent=parent)
656 session = parent.session
657 nodes.FSCollector.__init__(
658 self,
659 fspath=fspath,
660 path=path,
661 parent=parent,
662 config=config,
663 session=session,
664 nodeid=nodeid,
665 )
666 self.name = self.path.parent.name
667
668 def setup(self) -> None:
669 # Not using fixtures to call setup_module here because autouse fixtures

Callers 1

__init__Method · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected