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

Method _factorytraceback

src/_pytest/fixtures.py:721–733  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

719 )
720
721 def _factorytraceback(self) -> List[str]:
722 lines = []
723 for fixturedef in self._get_fixturestack():
724 factory = fixturedef.func
725 fs, lineno = getfslineno(factory)
726 if isinstance(fs, Path):
727 session: Session = self._pyfuncitem.session
728 p = bestrelpath(session.path, fs)
729 else:
730 p = fs
731 args = _format_args(factory)
732 lines.append("%s:%d: def %s%s" % (p, lineno + 1, factory.__name__, args))
733 return lines
734
735 def _getscopeitem(
736 self, scope: Union[Scope, "_ScopeName"]

Callers 1

_check_scopeMethod · 0.95

Calls 5

_get_fixturestackMethod · 0.95
getfslinenoFunction · 0.90
bestrelpathFunction · 0.90
_format_argsFunction · 0.90
appendMethod · 0.80

Tested by

no test coverage detected