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

Method newinstance

src/_pytest/python.py:754–755  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

752 return super().from_parent(name=name, parent=parent, **kw)
753
754 def newinstance(self):
755 return self.obj()
756
757 def collect(self) -> Iterable[nodes.Item | nodes.Collector]:
758 if not safe_getattr(self.obj, "__test__", True):

Callers 2

collectMethod · 0.95
_getinstanceMethod · 0.45

Calls 1

objMethod · 0.80

Tested by

no test coverage detected