fname
stringlengths
63
176
rel_fname
stringclasses
706 values
line
int64
-1
4.5k
name
stringlengths
1
81
kind
stringclasses
2 values
category
stringclasses
2 values
info
stringlengths
0
77.9k
⌀
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
346
next_lower
ref
function
no_argkey_group, argkeys_cache, items_by_argkey, scope.next_lower()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
354
_fillfuncargs
def
function
def _fillfuncargs(function: "Function") -> None: """Fill missing fixtures for a test function, old public API (deprecated).""" warnings.warn(FILLFUNCARGS.format(name="pytest._fillfuncargs()"), stacklevel=2) _fill_fixtures_impl(function)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
357
_fill_fixtures_impl
ref
function
_fill_fixtures_impl(function)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
360
fillfixtures
def
function
def fillfixtures(function: "Function") -> None: """Fill missing fixtures for a test function (deprecated).""" warnings.warn( FILLFUNCARGS.format(name="_pytest.fixtures.fillfixtures()"), stacklevel=2 ) _fill_fixtures_impl(function)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
365
_fill_fixtures_impl
ref
function
_fill_fixtures_impl(function)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
368
_fill_fixtures_impl
def
function
def _fill_fixtures_impl(function: "Function") -> None: """Internal implementation to fill fixtures on the given function object.""" try: request = function._request except AttributeError: # XXX this special code path is only expected to execute # with the oejskit plugin. It uses cla...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
378
getfixtureinfo
ref
function
fi = fm.getfixtureinfo(function.parent, function.obj, None)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
380
FixtureRequest
ref
function
request = function._request = FixtureRequest(function, _ispytest=True)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
381
setup
ref
function
fm.session._setupstate.setup(function)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
382
_fillfixtures
ref
function
request._fillfixtures()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
386
_fillfixtures
ref
function
request._fillfixtures()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
389
get_direct_param_fixture_func
def
function
def get_direct_param_fixture_func(request): return request.param
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
394
FuncFixtureInfo
def
class
prune_dependency_tree
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
404
prune_dependency_tree
def
function
def prune_dependency_tree(self) -> None: """Recompute names_closure from initialnames and name2fixturedefs. Can only reduce names_closure, which means that the new closure will always be a subset of the old one. The order is preserved. This method is needed because direct parametri...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
432
FixtureRequest
def
class
__init__ scope fixturenames node _getnextfixturedef config function cls instance module path keywords session addfinalizer _addfinalizer applymarker raiseerror _fillfixtures getfixturevalue _get_active_fixturedef _get_fixturestack _compute_fixture_value _schedule_finalizers _check_scope _factorytraceback _getscopeitem ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
441
check_ispytest
ref
function
check_ispytest(_ispytest)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
453
scope
def
function
def scope(self) -> "_ScopeName": """Scope string, one of "function", "class", "module", "package", "session".""" return self._scope.value @property def fixturenames(self) -> List[str]: """Names of all active fixtures in this request.""" result = list(self._pyfuncitem._fixtur...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
458
fixturenames
def
function
def fixturenames(self) -> List[str]: """Names of all active fixtures in this request.""" result = list(self._pyfuncitem._fixtureinfo.names_closure) result.extend(set(self._fixture_defs).difference(result)) return result @property def node(self): """Underlying collect...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
465
node
def
function
def node(self): """Underlying collection node (depends on current request scope).""" return self._getscopeitem(self._scope) def _getnextfixturedef(self, argname: str) -> "FixtureDef[Any]": fixturedefs = self._arg2fixturedefs.get(argname, None) if fixturedefs is None: ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
467
_getscopeitem
ref
function
return self._getscopeitem(self._scope)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
469
_getnextfixturedef
def
function
def _getnextfixturedef(self, argname: str) -> "FixtureDef[Any]": fixturedefs = self._arg2fixturedefs.get(argname, None) if fixturedefs is None: # We arrive here because of a dynamic call to # getfixturevalue(argname) usage which was naturally # not known at parsin...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
477
getfixturedefs
ref
function
fixturedefs = self._fixturemanager.getfixturedefs(argname, parentid)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
484
FixtureLookupError
ref
function
raise FixtureLookupError(argname, self)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
489
config
def
function
def config(self) -> Config: """The pytest config object associated with this request.""" return self._pyfuncitem.config # type: ignore[no-any-return] @property def function(self): """Test function object if the request has a per-function scope.""" if self.scope != "function...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
494
function
def
function
def function(self): """Test function object if the request has a per-function scope.""" if self.scope != "function": raise AttributeError( f"function not available in {self.scope}-scoped context" ) return self._pyfuncitem.obj @property def cls...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
503
cls
def
function
def cls(self): """Class (can be None) where the test function was collected.""" if self.scope not in ("class", "function"): raise AttributeError(f"cls not available in {self.scope}-scoped context") clscol = self._pyfuncitem.getparent(_pytest.python.Class) if clscol: ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
507
getparent
ref
function
clscol = self._pyfuncitem.getparent(_pytest.python.Class)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
512
instance
def
function
def instance(self): """Instance (can be None) on which test function was collected.""" # unittest support hack, see _pytest.unittest.TestCaseFunction. try: return self._pyfuncitem._testcase except AttributeError: function = getattr(self, "function", None) ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
522
module
def
function
def module(self): """Python module object where the test function was collected.""" if self.scope not in ("function", "class", "module"): raise AttributeError(f"module not available in {self.scope}-scoped context") return self._pyfuncitem.getparent(_pytest.python.Module).obj ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
526
getparent
ref
function
return self._pyfuncitem.getparent(_pytest.python.Module).obj
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
529
path
def
function
def path(self) -> Path: if self.scope not in ("function", "class", "module", "package"): raise AttributeError(f"path not available in {self.scope}-scoped context") # TODO: Remove ignore once _pyfuncitem is properly typed. return self._pyfuncitem.path # type: ignore @propert...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
536
keywords
def
function
def keywords(self) -> MutableMapping[str, Any]: """Keywords/markers dictionary for the underlying node.""" node: nodes.Node = self.node return node.keywords @property def session(self) -> "Session": """Pytest session object.""" return self._pyfuncitem.session # type...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
542
session
def
function
def session(self) -> "Session": """Pytest session object.""" return self._pyfuncitem.session # type: ignore[no-any-return] def addfinalizer(self, finalizer: Callable[[], object]) -> None: """Add finalizer/teardown function to be called after the last test within the requesting ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
546
addfinalizer
def
function
def addfinalizer(self, finalizer: Callable[[], object]) -> None: """Add finalizer/teardown function to be called after the last test within the requesting test context finished execution.""" # XXX usually this method is shadowed by fixturedef specific ones. self._addfinalizer(finaliz...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
550
_addfinalizer
ref
function
self._addfinalizer(finalizer, scope=self.scope)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
552
_addfinalizer
def
function
def _addfinalizer(self, finalizer: Callable[[], object], scope) -> None: node = self._getscopeitem(scope) node.addfinalizer(finalizer) def applymarker(self, marker: Union[str, MarkDecorator]) -> None: """Apply a marker to a single test function invocation. This method is useful...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
553
_getscopeitem
ref
function
node = self._getscopeitem(scope)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
554
addfinalizer
ref
function
node.addfinalizer(finalizer)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
556
applymarker
def
function
def applymarker(self, marker: Union[str, MarkDecorator]) -> None: """Apply a marker to a single test function invocation. This method is useful if you don't want to have a keyword/marker on all function invocations. :param marker: A :class:`pytest.MarkDecorator` object ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
566
add_marker
ref
function
self.node.add_marker(marker)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
568
raiseerror
def
function
def raiseerror(self, msg: Optional[str]) -> "NoReturn": """Raise a FixtureLookupError with the given message.""" raise self._fixturemanager.FixtureLookupError(None, self, msg) def _fillfixtures(self) -> None: item = self._pyfuncitem fixturenames = getattr(item, "fixturenames", s...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
570
FixtureLookupError
ref
function
raise self._fixturemanager.FixtureLookupError(None, self, msg)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
572
_fillfixtures
def
function
def _fillfixtures(self) -> None: item = self._pyfuncitem fixturenames = getattr(item, "fixturenames", self.fixturenames) for argname in fixturenames: if argname not in item.funcargs: item.funcargs[argname] = self.getfixturevalue(argname) def getfixturevalue(s...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
577
getfixturevalue
ref
function
item.funcargs[argname] = self.getfixturevalue(argname)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
579
getfixturevalue
def
function
def getfixturevalue(self, argname: str) -> Any: """Dynamically run a named fixture function. Declaring fixtures via function argument is recommended where possible. But if you can only decide whether to use another fixture at test setup time, you may use this function to retrieve it...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
590
_get_active_fixturedef
ref
function
fixturedef = self._get_active_fixturedef(argname)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
594
_get_active_fixturedef
def
function
def _get_active_fixturedef( self, argname: str ) -> Union["FixtureDef[object]", PseudoFixtureDef[object]]: try: return self._fixture_defs[argname] except KeyError: try: fixturedef = self._getnextfixturedef(argname) except FixtureLookupE...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
601
_getnextfixturedef
ref
function
fixturedef = self._getnextfixturedef(argname)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
605
PseudoFixtureDef
ref
function
return PseudoFixtureDef(cached_result, Scope.Function)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
609
_compute_fixture_value
ref
function
self._compute_fixture_value(fixturedef)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
613
_get_fixturestack
def
function
def _get_fixturestack(self) -> List["FixtureDef[Any]"]: current = self values: List[FixtureDef[Any]] = [] while isinstance(current, SubRequest): values.append(current._fixturedef) # type: ignore[has-type] current = current._parent_request values.reverse() ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
622
_compute_fixture_value
def
function
def _compute_fixture_value(self, fixturedef: "FixtureDef[object]") -> None: """Create a SubRequest based on "self" and call the execute method of the given FixtureDef object. This will force the FixtureDef object to throw away any previous results and compute a new fixture value, wh...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
636
getparam
ref
function
param = funcitem.callspec.getparam(argname)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
652
fail
ref
function
fail(msg, pytrace=False)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
656
absolutepath
ref
function
source_path = absolutepath(frameinfo.filename)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
671
getlocation
ref
function
getlocation(fixturedef.func, funcitem.config.rootpath),
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
676
fail
ref
function
fail(msg, pytrace=False)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
684
SubRequest
ref
function
subrequest = SubRequest(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
689
_check_scope
ref
function
subrequest._check_scope(argname, self._scope, scope)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
692
execute
ref
function
fixturedef.execute(request=subrequest)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
694
_schedule_finalizers
ref
function
self._schedule_finalizers(fixturedef, subrequest)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
696
_schedule_finalizers
def
function
def _schedule_finalizers( self, fixturedef: "FixtureDef[object]", subrequest: "SubRequest" ) -> None: # If fixture function failed it might have registered finalizers. subrequest.node.addfinalizer(lambda: fixturedef.finish(request=subrequest)) def _check_scope( self, ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
700
addfinalizer
ref
function
subrequest.node.addfinalizer(lambda: fixturedef.finish(request=subrequest))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
700
finish
ref
function
subrequest.node.addfinalizer(lambda: fixturedef.finish(request=subrequest))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
702
_check_scope
def
function
def _check_scope( self, argname: str, invoking_scope: Scope, requested_scope: Scope, ) -> None: if argname == "request": return if invoking_scope > requested_scope: # Try to report something helpful. text = "\n".join(self._facto...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
712
_factorytraceback
ref
function
text = "\n".join(self._factorytraceback())
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
713
fail
ref
function
fail(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
720
_factorytraceback
def
function
def _factorytraceback(self) -> List[str]: lines = [] for fixturedef in self._get_fixturestack(): factory = fixturedef.func fs, lineno = getfslineno(factory) if isinstance(fs, Path): session: Session = self._pyfuncitem.session p = be...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
722
_get_fixturestack
ref
function
for fixturedef in self._get_fixturestack():
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
724
getfslineno
ref
function
fs, lineno = getfslineno(factory)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
727
bestrelpath
ref
function
p = bestrelpath(session.path, fs)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
730
_format_args
ref
function
args = _format_args(factory)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
734
_getscopeitem
def
function
def _getscopeitem( self, scope: Union[Scope, "_ScopeName"] ) -> Union[nodes.Item, nodes.Collector]: if isinstance(scope, str): scope = Scope(scope) if scope is Scope.Function: # This might also be a non-function Item despite its attribute name. node: O...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
738
Scope
ref
function
scope = Scope(scope)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
745
get_scope_package
ref
function
node = get_scope_package(self._pyfuncitem, self._fixturedef) # type: ignore[attr-defined]
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
747
get_scope_node
ref
function
node = get_scope_node(self._pyfuncitem, scope)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
761
SubRequest
def
class
__init__ __repr__ addfinalizer _schedule_finalizers
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
774
check_ispytest
ref
function
check_ispytest(_ispytest)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
791
addfinalizer
def
function
def addfinalizer(self, finalizer: Callable[[], object]) -> None: """Add finalizer/teardown function to be called after the last test within the requesting test context finished execution.""" # XXX usually this method is shadowed by fixturedef specific ones. self._addfinalizer(finaliz...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
794
addfinalizer
ref
function
self._fixturedef.addfinalizer(finalizer)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
796
_schedule_finalizers
def
function
def _schedule_finalizers( self, fixturedef: "FixtureDef[object]", subrequest: "SubRequest" ) -> None: # If fixture function failed it might have registered finalizers. subrequest.node.addfinalizer(lambda: fixturedef.finish(request=subrequest)) def _check_scope( self, ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
803
addfinalizer
ref
function
fixturedef.addfinalizer(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
806
_schedule_finalizers
ref
function
super()._schedule_finalizers(fixturedef, subrequest)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
810
FixtureLookupError
def
class
__init__ formatrepr
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
818
_get_fixturestack
ref
function
self.fixturestack = request._get_fixturestack()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
821
formatrepr
def
function
def formatrepr(self) -> "FixtureLookupErrorRepr": tblines: List[str] = [] addline = tblines.append stack = [self.request._pyfuncitem.obj] stack.extend(map(lambda x: x.func, self.fixturestack)) msg = self.msg if msg is not None: # The last fixture raise an ...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
832
getfslineno
ref
function
fspath, lineno = getfslineno(function)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
834
get_real_func
ref
function
lines, _ = inspect.getsourcelines(get_real_func(function))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
837
addline
ref
function
addline(error_msg % (fspath, lineno + 1))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
839
addline
ref
function
addline(f"file {fspath}, line {lineno + 1}")
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
842
addline
ref
function
addline(" " + line)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
851
_matchfactories
ref
function
faclist = list(fm._matchfactories(fixturedefs, parentid))
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
863
FixtureLookupErrorRepr
ref
function
return FixtureLookupErrorRepr(fspath, lineno, tblines, msg, self.argname)
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
866
FixtureLookupErrorRepr
def
class
__init__ toterminal
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
881
toterminal
def
function
def toterminal(self, tw: TerminalWriter) -> None: # tw.line("FixtureLookupError: %s" %(self.argname), red=_True) for tbline in self.tblines: tw.line(tbline.rstrip()) lines = self.errorstring.split("\n") if lines: tw.line( f"{FormattedExcinfo.fa...
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
884
line
ref
function
tw.line(tbline.rstrip())
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
887
line
ref
function
tw.line(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
892
line
ref
function
tw.line(
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
896
line
ref
function
tw.line()
playground/5d9c10a9-c67f-4d61-a0f0-c84c5a279fa1/pytest/src/_pytest/fixtures.py
src/_pytest/fixtures.py
897
line
ref
function
tw.line("%s:%d" % (os.fspath(self.filename), self.firstlineno + 1))