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

Method __call__

src/_pytest/nodes.py:90–97  ·  view source on GitHub ↗
(cls, *k, **kw)

Source from the content-addressed store, hash-verified

88 """
89
90 def __call__(cls, *k, **kw) -> NoReturn:
91 msg = (
92 "Direct construction of {name} has been deprecated, please use {name}.from_parent.\n"
93 "See "
94 "https://docs.pytest.org/en/stable/deprecations.html#node-construction-changed-to-node-from-parent"
95 " for more details."
96 ).format(name=f"{cls.__module__}.{cls.__name__}")
97 fail(msg, pytrace=False)
98
99 def _create(cls: type[_T], *k, **kw) -> _T:
100 try:

Callers 1

_createMethod · 0.45

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected