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

Method istestfunction

src/_pytest/python.py:369–376  ·  view source on GitHub ↗
(self, obj: object, name: str)

Source from the content-addressed store, hash-verified

367 return self._matches_prefix_or_glob_option("python_classes", name)
368
369 def istestfunction(self, obj: object, name: str) -> bool:
370 if self.funcnamefilter(name) or self.isnosetest(obj):
371 if isinstance(obj, staticmethod | classmethod):
372 # staticmethods and classmethods need to be unwrapped.
373 obj = safe_getattr(obj, "__func__", False)
374 return callable(obj) and fixtures.getfixturemarker(obj) is None
375 else:
376 return False
377
378 def istestclass(self, obj: object, name: str) -> bool:
379 if not (self.classnamefilter(name) or self.isnosetest(obj)):

Callers 1

Calls 3

funcnamefilterMethod · 0.95
isnosetestMethod · 0.95
safe_getattrFunction · 0.90

Tested by

no test coverage detected